Re: Performance of count(*)
От
Merlin Moncure
Тема
Re: Performance of count(*)
Дата
Msg-id
b42b73150703220639x40dbac7en29318778b43e1e4c@mail.gmail.com
Ответ на
Performance of count(*) (Andreas Tille)
Список
Дерево обсуждения
Performance of count(*) Andreas Tille <tillea@rki.de>
Re: Performance of count(*) Andreas Kostyrka <andreas@kostyrka.org>
Re: Performance of count(*) Andreas Tille <tillea@rki.de>
Re: Performance of count(*) Andreas Kostyrka <andreas@kostyrka.org>
Re: Performance of count(*) Michael Fuhr <mike@fuhr.org>
Re: Performance of count(*) Carlos Moreno <moreno_pg@mochima.com>
Re: Performance of count(*) "Luke Lonergan" <llonergan@greenplum.com>
Re: Performance of count(*) Albert Cervera Areny <albert@sedifa.com>
Re: Performance of count(*) ismo.tuononen@solenovo.fi
Re: Performance of count(*) Bill Moran <wmoran@collaborativefusion.com>
Re: Performance of count(*) Michael Stone <mstone+postgres@mathom.us>
Re: Performance of count(*) mark@mark.mielke.cc
Re: Performance of count(*) "Craig A. James" <cjames@modgraph-usa.com>
Re: Performance of count(*) Tino Wildenhain <tino@wildenhain.de>
Re: Performance of count(*) "Craig A. James" <cjames@modgraph-usa.com>
Re: Performance of count(*) Steve Atkins <steve@blighty.com>
Re: Performance of count(*) "Craig A. James" <cjames@modgraph-usa.com>
Re: Performance of count(*) Tom Lane <tgl@sss.pgh.pa.us>
Re: Performance of count(*) "Craig A. James" <cjames@modgraph-usa.com>
Re: Performance of count(*) Tom Lane <tgl@sss.pgh.pa.us>
Re: Performance of count(*) Guido Neitzer <lists@event-s.net>
Re: Performance of count(*) Steve Atkins <steve@blighty.com>
Re: Performance of count(*) Tino Wildenhain <tino@wildenhain.de>
Re: Performance of count(*) Michael Stone <mstone+postgres@mathom.us>
Re: Performance of count(*) Tino Wildenhain <tino@wildenhain.de>
Re: Performance of count(*) Michael Stone <mstone+postgres@mathom.us>
Re: Performance of count(*) Tino Wildenhain <tino@wildenhain.de>
Re: Performance of count(*) "Merlin Moncure" <mmoncure@gmail.com>
Re: Performance of count(*) Tino Wildenhain <tino@wildenhain.de>
Re: Performance of count(*) Michael Stone <mstone+postgres@mathom.us>
Re: Performance of count(*) Michael Stone <mstone+postgres@mathom.us>
Re: Performance of count(*) Michael Stone <mstone+postgres@mathom.us>
Re: Performance of count(*) "Craig A. James" <cjames@modgraph-usa.com>
Re: Performance of count(*) Tino Wildenhain <tino@wildenhain.de>
Re: Performance of count(*) Brian Hurt <bhurt@janestcapital.com>
Re: Performance of count(*) "Craig A. James" <cjames@modgraph-usa.com>
Re: Performance of count(*) Mario Weilguni <mweilguni@sime.com>
Re: Performance of count(*) "Merlin Moncure" <mmoncure@gmail.com>
Re: Performance of count(*) Michael Stone <mstone+postgres@mathom.us>
Re: Performance of count(*) "Jonah H. Harris" <jonah.harris@gmail.com>
Re: Performance of count(*) Mario Weilguni <mweilguni@sime.com>
Re: Performance of count(*) Andreas Kostyrka <andreas@kostyrka.org>
Re: Performance of count(*) Mario Weilguni <mweilguni@sime.com>
Re: Performance of count(*) ismo.tuononen@solenovo.fi
On 3/22/07, Andreas Tille wrote: > I just try to find out why a simple count(*) might last that long. > At first I tried explain, which rather quickly knows how many rows > to check, but the final count is two orders of magnitude slower. You can get the approximate count by selecting reltuples from pg_class. It is valid as of last analyze. As others suggest select count(*) from table is very special case which non-mvcc databases can optimize for. There are many reasons why this is the case and why it explains nothing about the relative performance of the two databases. This is probably #1 most frequenctly asked question to -performance...there is a wealth of information in the archives. merlin
В списке pgsql-performance по дате отправления