Re: [GENERAL] Poor select count(*) performance

2009-02-23 Thread Mike Ivanov
On Mon, Feb 23, 2009 at 6:54 PM, Sam Mason wrote: Depending on where these are on disk and how fast your disks are this > could take up to 30 seconds. This does not sound very inspiring :-) Would throwing more hardware (memory, faster CPU) at the server improve the situation? > If you want t

[GENERAL] Poor select count(*) performance

2009-02-23 Thread Mike Ivanov
Hi there, I'm sorry for a stupid question but I'm really stuck. A query: SELECT COUNT(*) FROM "lingq_card" WHERE "lingq_card"."context_id" = ...; An hour ago it took 8 seconds, one minute ago the same query took just only 7 milliseconds. Any ideas why the execution time varies so wildly? Expl