Search Postgresql Archives

Re: SELECT count(*) Generating Lots of Write Activity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Logan Bowers" <logan@xxxxxxxxxx> writes:

> I'm potentially having a strange performance problem.  I have a BIG table:
> ~100M, ~1KB rows.  I do a SELECT count(*) from it (I know it will be slow)
> and as I watch procinfo on my DB server I see a huge amount of write
> activity.  Thus,

The only thing I can think of is that you have a lot of dirty page
buffers (either in PG's shared buffer area or the kernel's page cache)
due to prior write activity, and they are getting written out to make
room for the sequential scan's incoming buffers.

> 3)       Are my tools lying to me (i.e. procinfo is wrong)?

Perhaps; if you're on Linux try 'vmstat' instead of procinfo as a
check.

-Doug

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux