How to find which query are doing seq_scan

Started by AI Rummanover 15 years ago2 messagesgeneral
Jump to latest
#1AI Rumman
rummandba@gmail.com

I am using Postgresql 8.1.
I need to know which query are executing seq_scan on tables as statistics
said there were 4 seq_scan on the tables for the last 2 days.
Any idea please.

#2Scott Marlowe
scott.marlowe@gmail.com
In reply to: AI Rumman (#1)
Re: How to find which query are doing seq_scan

On Sun, Oct 17, 2010 at 10:58 PM, AI Rumman <rummandba@gmail.com> wrote:

I am using Postgresql 8.1.
I need to know which query are executing seq_scan on tables as statistics
said there were 4 seq_scan on the tables for the last 2 days.

Not sure really. You could log all query plans I think, but I don't
know if 8.1 supports that. Upgrading to 8.4 or 9.0 would be a huge
performance boost, and sequential scans can run in parallel from > 1
query there, as well as a lot of work done on keeping them in a ring
buffer so they don't blow out the shared_buffers cache.

If you're just looking for slow queries, then just log slow queries.

--
To understand recursion, one must first understand recursion.