Comments (5)
immediately
is a very long time in terms of computing. Even if it seems like <1ms for the user, during this time, the data could have changed many times on the server. Pgcat just doesn't have this kind of information, especially when multiple clients are involved, so what you're really describing is caching.
from pgcat.
You're describing query caching. I think this is a valuable and dangerous feature: just because the client issues the same query, doesn't mean it will return the same result both times. I think this one merits some thought, but it definitely does have a precedent, e.g. PgPool-II has this feature.
FWIW, Postgres has good caching characteristics, so if you issue the same query twice, the second result will return much quicker because most necessary buffers will most likely be in RAM, unless of course the query scans a very large table, in which case the pooler wouldn't be able to cache it anyway.
from pgcat.
we could done caching in our application
I think in pgcat
we can do it a little bit different, just return
the result to all clients running the same sql immediately, without holding the postgres result, not really caching
it.
ideas come from #62 , maybe pgcat
do not need heavy processing on the package :)
introducing extra set dedup
is to avoid situation where we just want the db the handle the concurrency
from pgcat.
we are experimenting readyset
, which does the sql caching.
what I describe above is more like the --query-caching inrequestpath
maybe we could do this in readyset
or alike, rather than implementing it in pgcat
.
from pgcat.
ReadySet is a lightweight SQL caching engine that sits between your application and database and turns even the most complex SQL reads into lightning-fast lookups. Unlike other caching solutions, ReadySet requires no changes to your application code.
This is interesting. Query caching is a difficult problem, I'd be curious to know what your experience with ReadySet is like if you're willing to share.
from pgcat.
Related Issues (20)
- Fails to compile with space in path
- The docs don't link to the APT Repository for pgcat HOT 2
- PGCat not using idle connections, instead spawns new ones. HOT 3
- ERROR pgcat::server: Unknown code: N HOT 1
- PGcat detection from code HOT 1
- Feature request: per-statement-type counters
- Error when prepared Statement in transaction mode
- Ubuntu 24.04 Packages
- support sql admin pool and server
- Invalid SQL Statement in rust integrration test
- "No pool configured for database" when trying to connect to pgcat instance HOT 2
- SELECT ... FOR UPDATE is routed to REPLICA HOT 1
- pgcat decreases TPS from unproxied posgresql 16 by 4x to 5x (docker-compose reproducer) HOT 3
- Questions Regarding pgcat Error Metrics
- Outdated Documentation
- Need to improve documentation how to correctly configure to use one user to auth others
- pool_size reset automatically to 25 if you set value more than 1000 HOT 1
- [Question] Pgcat not found in Artifact Hub
- Does PGCAT support environment variables in the pgcat.toml file HOT 1
- FR - caching results
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgcat.