Re: [PERFORM] how does pg handle concurrent queries and same queries

2008-07-30 Thread Dennis Brakhane
Slightly off-topic, but judging from the fact that you were able to fix the query, it seems you have some way to modify the application code itself. In that case, I'd try to implement caching (at least for this statement) on the application side, for example with memcached. -- Sent via

[PERFORM] how does pg handle concurrent queries and same queries

2008-07-28 Thread Faludi Gábor
Hi All, I have taken over the maintenance of a server farm , recently. 2 webserver on db server. They are quite powerful 2 processor xeon w/ 6Gig of ram . Couple of days ago we had a serious performance hit and the db server (pg. v7.4) was overloaded w/ something in a way that operating

Re: [PERFORM] how does pg handle concurrent queries and same queries

2008-07-28 Thread Claus Guttesen
I have taken over the maintenance of a server farm , recently. 2 webserver on db server. They are quite powerful 2 processor xeon w/ 6Gig of ram . Couple of days ago we had a serious performance hit and the db server (pg. v7.4) was overloaded w/ something in a way that operating system was

Re: [PERFORM] how does pg handle concurrent queries and same queries

2008-07-28 Thread Faludi Gábor
] how does pg handle concurrent queries and same queries I have taken over the maintenance of a server farm , recently. 2 webserver on db server. They are quite powerful 2 processor xeon w/ 6Gig of ram . Couple of days ago we had a serious performance hit and the db server (pg. v7.4

Re: [PERFORM] how does pg handle concurrent queries and same queries

2008-07-28 Thread Craig Ringer
Faludi Gábor wrote: . Why does the second and the later queries take the whole on second if the dataset is the same . Shouldn't PG realise that the query is the same so i give the user the same resultset ? That would require a result cache. I don't know if Pg even has a query result

Re: [PERFORM] how does pg handle concurrent queries and same queries

2008-07-28 Thread Matthew Wakeling
On Mon, 28 Jul 2008, Faludi Gábor wrote: EXPLAIN ANALYZE SELECT DISTINCT letoltes.cid, count(letoltes.cid) AS elofordulas FROM letoltes GROUP BY cid ORDER BY elofordulas DESC LIMIT 5; QUERY PLAN

Re: [PERFORM] how does pg handle concurrent queries and same queries

2008-07-28 Thread Alvaro Herrera
Craig Ringer wrote: Faludi Gábor wrote: . Why does the second and the later queries take the whole on second if the dataset is the same . Shouldn't PG realise that the query is the same so i give the user the same resultset ? That would require a result cache. I don't know if