Re: Thanks, naming conventions, and count()
От | Casey Lyon |
---|---|
Тема | Re: Thanks, naming conventions, and count() |
Дата | |
Msg-id | 3AECDE4D.5060608@earthcars.com обсуждение исходный текст |
Ответ на | Re: Thanks, naming conventions, and count() (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: Thanks, naming conventions, and count()
|
Список | pgsql-hackers |
Bruce Momjian wrote: > The problem here is that now we don't have commit status in the index > rows, so they have to check the heap for every row. One idea is to > update the index status on an index scan, and if we can do that, we can > easily use the index. However, the table scan is pretty quick. It certainly works quickly for smaller tables, however the 21.7 million record table I ran this on takes a touch longer as shown here: database=# explain select count(*) from table; NOTICE: QUERY PLAN: Aggregate (cost=478056.20..478056.20 rows=1 width=0) -> Seq Scan on table (cost=0.00..423737.76 rows=21727376 width=0) EXPLAIN However I noted explain provides rows as part of it's data; from what I've seen this loses precision over time or with large data imports, though; at least until the table is vacuumed again. -Casey
В списке pgsql-hackers по дате отправления: