SELECT count(*) Generating Lots of Write Activity

Поиск
Список
Период
Сортировка
От Logan Bowers
Тема SELECT count(*) Generating Lots of Write Activity
Дата
Msg-id 85CE4E3FD2EC2C4E8AAE39916AC1A383069E34D3@ms07.mse2.exchange.ms
обсуждение исходный текст
Ответы Re: SELECT count(*) Generating Lots of Write Activity  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: SELECT count(*) Generating Lots of Write Activity  (Douglas McNaught <doug@mcnaught.org>)
Список pgsql-general

Hello,

 

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,

 

1)       Why does this statement generate any writes at all?

2)       Is it possible to tweak something to make it avoid doing so? 

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

 

Thanks! 

 

Oh, and our server configuration is:

Postgres 8.0.1, Linux 2.6, AMD64, 4GB RAM, and 3TB of storage (two RAID5 volumes striped together)

 

 

Logan Bowers

В списке pgsql-general по дате отправления:

Предыдущее
От: hisatomo@ctc-g.co.jp
Дата:
Сообщение: could not bind IPv6 socket
Следующее
От: Tom Lane
Дата:
Сообщение: Re: feeding big script to psql