---
title: "New PolyScale Integration to Improve Read Performance and Latency for Your Applications"
description: "Netlify’s latest integration with PolyScale enables developers with a powerful tool to improve the read performance and reduce latency of their applications. By adding a caching layer in front of their existing databases, developers can provide a better user experience and scale their applications to handle higher read traffic."
source: "https://www.netlify.com/blog/polyscale-integration/"
last_updated: "2026-07-10T19:55:58.000Z"
---
Performance optimizations and low latency are important for most developers, but these priorities are especially critical for those building complex sites and web applications. Ecommerce stores, social media platforms, online marketplaces, and other types of apps typically put a significant load on the underlying database, which sometimes results in slow response times and degraded performance. In scenarios that also include high read traffic, geographically dispersed users, and limited database scalability, performance bottlenecks worsen, resulting in poor user experience.

Our latest integration with [PolyScale](https://www.polyscale.ai/) addresses performance issues caused by slow database access by storing frequently accessed data in the cache, reducing the load on the underlying database and improving the overall performance of the application. This integration enables you to create or select a PolyScale cache from the Netlify UI, execute queries against your cache from your serverless functions, and use code snippets generated in the Netlify UI to get started easily.

![image](https://cdn.sanity.io/images/o0o2tn5x/production/40b8b2c460ea5fbaaed218d027c15023cdf5414f-800x517.gif?w=1500)

In the GIF above, you can see that creating and fetching the new cache is captured in a simple flow.

## Calling Your Cache from a Function

After the cache has been added, you can select the cache you want to use from the **Database cache** menu (For detailed instructions on connecting your PolyScale account to your Netlify account and adding a cache, refer to our [docs page](https://docs.netlify.com/integrations/polyscale-integration/)). Note that the name of your cache uses the same alias you create initially.

![image](https://cdn.sanity.io/images/o0o2tn5x/production/f8bd3ebafe0712a69cc4d5a14cecb454f9faf825-1980x874.png?w=1500)

When you select a cache, the Netlify UI detects the type of database and generates a code snippet you can use to get started. For example, if a `CUSTOMERS` cache uses Postgres, the following code snippet generates:

```
import postgres from "postgres";
const sql = postgres(process.env.POLYSCALE_CUSTOMERS_CONNECTION_URI);
```

You can use this snippet in a [serverless function](https://deploy-preview-2973--docs.netlify.app/functions/overview/). In a project, you may have a file structure similar to this:

```
├─ netlify/   │  └─functions/   │   └─ customers/   │     └─ index.ts   └─package.json
```

In this example, `index.ts` is a function that executes a call to the Postgres database to select all customers. The snippet provides the starter code to add to this file. In this example, the snippet has been modified slightly to use TypeScript:

```
import { Handler } from "@netlify/functions";import postgres from "postgres";
const handler: Handler = async function(event, context) {  const sql = postgres(    process.env.POLYSCALE_CUSTOMERS_CONNECTION_URI as string  );
  const customers = await sql`SELECT * from customers`;
  console.log("customers", customers);
  return {    statusCode: 200,    body: JSON.stringify({      customers,    }),  };};
export { handler };
```

If you have any questions or feedback about this integration, feel free to post in our [forums](https://answers.netlify.com/?_gl=1*erynin*_gcl_aw*R0NMLjE2Nzk2MTAxMTYuQ2owS0NRanc4ZS1nQmhEMEFSSXNBSmlEc2FWMnluUExWSXBXcld3RnRmNEhSWUxWVWRtVWdRVEFFWjd3Wi1kUDY2dGNWRm5VQ1ZYOWRlZ2FBbnh2RUFMd193Y0I.)!

### Share

-   [X (fka Twitter)](https://twitter.com/intent/tweet?text=New PolyScale Integration to Improve Read Performance and Latency for Your Applications&url=https://www.netlify.com/blog/polyscale-integration/)
-   [LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.netlify.com%2Fblog%2Fpolyscale-integration%2F)
-   [Facebook](https://www.facebook.com/sharer.php?u=https://www.netlify.com/blog/polyscale-integration/)
-   [Bluesky](https://bsky.app/intent/compose?text=New PolyScale Integration to Improve Read Performance and Latency for Your Applications+https://www.netlify.com/blog/polyscale-integration/)

* * *

### Tags

-   [changelog](/blog/tags/changelog/)
-   [Databases](/blog/tags/databases/)

## Keep reading

![](/_astro/eb275ddb9290b947ba4c53ac30538c77b44edae9-720x405_1y2MXK.webp)

News & Announcements June 25, 2026

[

### Netlify Functions, designed for Agent Experience

](/blog/netlify-functions-designed-for-agent-experience)

-   ![Profile picture of Eduardo Bouças](/_astro/52958f21e8450baf6d8e60302341a984e220c0cd-512x512_13VDlu.webp)
    
    Eduardo Bouças
    

![](/_astro/d20f9f717bbdd511f73ee138be4114ff13f480f9-2400x1350_1fe4aq.webp)

News & Announcements June 24, 2026

[

### How we measure Netlify’s Agent Experience

](/blog/how-we-measure-netlify-agent-experience)

-   ![Profile picture of Sean Roberts](/_astro/bbf2243f8171dbddd80ab2103622106cef84d125-512x512_Z1d2LKE.webp)
    
    Sean Roberts
    

## Recent posts

News & Announcements June 25, 2026

[

### Netlify Functions, designed for Agent Experience

](/blog/netlify-functions-designed-for-agent-experience)

-   ![Profile picture of Eduardo Bouças](/_astro/52958f21e8450baf6d8e60302341a984e220c0cd-512x512_13VDlu.webp)
    
    Eduardo Bouças
    

News & Announcements June 24, 2026

[

### How we measure Netlify’s Agent Experience

](/blog/how-we-measure-netlify-agent-experience)

-   ![Profile picture of Sean Roberts](/_astro/bbf2243f8171dbddd80ab2103622106cef84d125-512x512_Z1d2LKE.webp)
    
    Sean Roberts
    

Guides & Tutorials May 15, 2026

[

### How to build a real-time AI chatbot in minutes with Netlify Agent Runners (no backend)

](/blog/how-to-build-a-real-time-ai-chatbot-in-minutes-with-netlify-agent-runners-no-backend)

-   ![Profile picture of Nahrin Jalal](/_astro/f0e7c8f227a03fe58340c99ef5439d5a896c0733-272x272_Z23kDpD.webp)
    
    Nahrin Jalal
    

![](/_astro/3f255b372fa958df35802666ee33b4609b2d71bd-1200x1586_1VtE2D.webp)

### How do the best dev and marketing teams work together?

[Access the report](https://www.netlify.com/reports/2024-leadership-trend-report/access/)