GithubHelp home page GithubHelp logo

Comments (5)

levkk avatar levkk commented on July 28, 2024 1

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.

levkk avatar levkk commented on July 28, 2024

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.

DeoLeung avatar DeoLeung commented on July 28, 2024

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.

DeoLeung avatar DeoLeung commented on July 28, 2024

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.

levkk avatar levkk commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.