Re: [GENERAL] FreeBSD, Linux: select, select count(*) performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] FreeBSD, Linux: select, select count(*) performance
Дата
Msg-id 17919.1038413758@sss.pgh.pa.us
обсуждение исходный текст
Ответ на FreeBSD, Linux: select, select count(*) performance  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
Ответы Re: [GENERAL] FreeBSD, Linux: select, select count(*) performance  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
Список pgsql-sql
Achilleus Mantzios <achill@matrix.gatewaynet.com> writes:
> Linux q1
> ========
> dynacom=# EXPLAIN ANALYZE SELECT count(*) from noon;
> NOTICE:  QUERY PLAN:

> Aggregate  (cost=20508.19..20508.19 rows=1 width=0) (actual
> time=338.17..338.17
> rows=1 loops=1)
>   ->  Seq Scan on noon  (cost=0.00..20237.95 rows=108095 width=0) (actual
> time=0.01..225.73 rows=108095 loops=1)
> Total runtime: 338.25 msec

> Linux q2
> ========
> dynacom=# EXPLAIN ANALYZE SELECT * from noon;
> NOTICE:  QUERY PLAN:

> Seq Scan on noon  (cost=0.00..20237.95 rows=108095 width=1960) (actual
> time=1.22..67909.31 rows=108095 loops=1)
> Total runtime: 68005.96 msec

You didn't say what was *in* the table, exactly ... but I'm betting
there are a lot of toasted columns, and that the extra runtime
represents the time to fetch (and perhaps decompress) the TOAST entries.

            regards, tom lane

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Function and insert
Следующее
От: Achilleus Mantzios
Дата:
Сообщение: Re: [GENERAL] FreeBSD, Linux: select, select count(*) performance