Re: [HACKERS] query cache

2012-03-29 Thread Robert Haas
On Fri, Mar 23, 2012 at 2:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: What I think is more common is the repeated submission of queries that are *nearly* identical, but with either different parameter bindings or different constants.  It would be nice to

Re: [HACKERS] query cache

2012-03-29 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Interestingly, Peter Geoghegan's blog post on the pg_stat_statements patch you just committed[1] claims that the overhead of fingerprinting queries was only 1-2.5%, which is less than I would have thought, so if we ever get to the point where we're

Re: [HACKERS] query cache

2012-03-29 Thread Robert Haas
On Thu, Mar 29, 2012 at 4:57 PM, Tom Lane t...@sss.pgh.pa.us wrote: It's also probably worth keeping in mind the next time we bump the protocol version: it would be nice to have a way of doing prepare-bind-execute in a single protocol message, which I believe to be not possible at present.

Re: [HACKERS] query cache

2012-03-25 Thread Billy Earney
Thanks.. I'll keep those issues in mind. On Sat, Mar 24, 2012 at 6:18 PM, Tatsuo Ishii is...@postgresql.org wrote: Well, you'd have to start by demonstrating the benefit of it. The advantage of query caches in proxies and clients is well-known, because you can offload some of the work

Re: [HACKERS] query cache

2012-03-24 Thread Joshua Berkus
Billy, I've done a brief search of the postgresql mail archives, and I've noticed a few projects for adding query caches to postgresql, (for example, Masanori Yamazaki's query cache proposal for GSOC 2011), ... which was completed, btw. Take a look at the current release of pgPool. Are you

Re: [HACKERS] query cache

2012-03-24 Thread Tom Lane
Joshua Berkus j...@agliodbs.com writes: If you want to do something radical and new, then come up with a way for a client to request and then reuse a complete query plan by passing it to the server. [ raised eyebrow ] That seems like a complete nonstarter on two different grounds: cache

Re: [HACKERS] query cache

2012-03-24 Thread Billy Earney
On Sat, Mar 24, 2012 at 3:22 PM, Joshua Berkus j...@agliodbs.com wrote: Billy, I've done a brief search of the postgresql mail archives, and I've noticed a few projects for adding query caches to postgresql, (for example, Masanori Yamazaki's query cache proposal for GSOC 2011), ...

Re: [HACKERS] query cache

2012-03-24 Thread Tatsuo Ishii
Well, you'd have to start by demonstrating the benefit of it. The advantage of query caches in proxies and clients is well-known, because you can offload some of the work of the database onto other servers, this increasing capacity. Adding a query cache to the database server would require

[HACKERS] query cache

2012-03-23 Thread Billy Earney
Greetings! I've done a brief search of the postgresql mail archives, and I've noticed a few projects for adding query caches to postgresql, (for example, Masanori Yamazaki's query cache proposal for GSOC 2011), as well as the query cache announced at http://www.postgresql.org/about/news/1296/

Re: [HACKERS] query cache

2012-03-23 Thread Tom Lane
Billy Earney billy.ear...@gmail.com writes: I'm wondering if anyone would be interested in a query cache as a backend to postgresql? I believe this has been suggested and rejected several times before. Did you look through the pgsql-hackers archives? To invalidate cache entries, look at the

Re: [HACKERS] query cache

2012-03-23 Thread Greg Stark
On Fri, Mar 23, 2012 at 3:49 PM, Tom Lane t...@sss.pgh.pa.us wrote: The complication, opportunities for bugs, and general slowdown associated with that would outweigh any possible gain, in the opinion of most hackers who have thought about this. I wouldn't be quite so pessimistic. I think the

Re: [HACKERS] query cache

2012-03-23 Thread Billy Earney
On Fri, Mar 23, 2012 at 11:29 AM, Greg Stark st...@mit.edu wrote: On Fri, Mar 23, 2012 at 3:49 PM, Tom Lane t...@sss.pgh.pa.us wrote: The complication, opportunities for bugs, and general slowdown associated with that would outweigh any possible gain, in the opinion of most hackers who

Re: [HACKERS] query cache

2012-03-23 Thread Robert Haas
On Fri, Mar 23, 2012 at 12:29 PM, Greg Stark st...@mit.edu wrote: On Fri, Mar 23, 2012 at 3:49 PM, Tom Lane t...@sss.pgh.pa.us wrote: The complication, opportunities for bugs, and general slowdown associated with that would outweigh any possible gain, in the opinion of most hackers who have

Re: [HACKERS] query cache

2012-03-23 Thread Greg Stark
On Fri, Mar 23, 2012 at 5:03 PM, Robert Haas robertmh...@gmail.com wrote: The other thing that makes me skeptical of this proposal is that I am not very sure that executing absolutely identical queries is a very common use case for a relational database.  I suppose there might be a few queries

Re: [HACKERS] query cache

2012-03-23 Thread Merlin Moncure
On Fri, Mar 23, 2012 at 12:03 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 23, 2012 at 12:29 PM, Greg Stark st...@mit.edu wrote: On Fri, Mar 23, 2012 at 3:49 PM, Tom Lane t...@sss.pgh.pa.us wrote: The complication, opportunities for bugs, and general slowdown associated with that

Re: [HACKERS] query cache

2012-03-23 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: What I think is more common is the repeated submission of queries that are *nearly* identical, but with either different parameter bindings or different constants. It would be nice to have some kind of cache that would allow us to avoid the overhead

Re: [HACKERS] query cache

2012-03-23 Thread Robert Haas
On Fri, Mar 23, 2012 at 1:51 PM, Greg Stark st...@mit.edu wrote: Well it's not entirely unlikely. If you step back a web application looks like a big loop with a switch statement to go to different pages. It keeps executing the same loop over and over again and there are only a smallish number

[HACKERS] Query cache import?

2000-10-31 Thread Alfred Perlstein
I never saw much traffic regarding Karel's work on making stored proceedures: http://people.freebsd.org/~alfred/karel-pgsql.txt What happened with this? It looked pretty interesting. :( -- -Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]] "I have the heart of a child; I keep it in a