hash aggregation

Поиск
Список
Период
Сортировка
Искать
От
Korisk
Тема
hash aggregation
Дата
Msg-id
118871349885342@web16f.yandex.ru
Список
Дерево обсуждения
hash aggregation Korisk <Korisk@yandex.ru>
Re: hash aggregation Sergey Konoplev <gray.ru@gmail.com>
Re: hash aggregation Korisk <Korisk@yandex.ru>
Re: hash aggregation Craig Ringer <ringerc@ringerc.id.au>
Re: hash aggregation Korisk <Korisk@yandex.ru>
Re: hash aggregation Tomas Vondra <tv@fuzzy.cz>
Re: hash aggregation Sergey Konoplev <gray.ru@gmail.com>
Re: hash aggregation Korisk <Korisk@yandex.ru>
Re: hash aggregation Sergey Konoplev <gray.ru@gmail.com>
Re: hash aggregation Korisk <Korisk@yandex.ru>
Re: hash aggregation Sergey Konoplev <gray.ru@gmail.com>
Re: hash aggregation Tomas Vondra <tv@fuzzy.cz>
Re: hash aggregation Ondrej Ivanič <ondrej.ivanic@gmail.com>
Re: hash aggregation Korisk <Korisk@yandex.ru>
Re: hash aggregation Sergey Konoplev <gray.ru@gmail.com>
Hello! Is it possible to speed up the plan? 

hashes=# \d hashcheck
                              Table "public.hashcheck"
 Column |       Type        |                       Modifiers                        
--------+-------------------+--------------------------------------------------------
 id     | integer           | not null default nextval('hashcheck_id_seq'::regclass)
 name   | character varying | 
 value  | character varying | 
Indexes:
    "btr" btree (name)

hashes=# select version();
                                                   version                                                    
--------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.2.1 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.7.2 20120921 (Red Hat 4.7.2-2), 64-bit
(1 row)

hashes=# explain analyse verbose select name, count(name) as cnt from hashcheck group by name order by name desc;
                                                                 QUERY PLAN                                                               
   
---------------------------------------------------------------------------------------------------------------------------------------------
 Sort  (cost=573977.88..573978.38 rows=200 width=32) (actual time=10351.280..10351.551 rows=4000 loops=1)
   Output: name, (count(name))
   Sort Key: hashcheck.name
   Sort Method: quicksort  Memory: 315kB
   ->  HashAggregate  (cost=573968.24..573970.24 rows=200 width=32) (actual time=10340.507..10341.288 rows=4000 loops=1)
         Output: name, count(name)
         ->  Seq Scan on public.hashcheck  (cost=0.00..447669.16 rows=25259816 width=32) (actual time=0.019..2798.058 rows=25259817 loops=1)
               Output: id, name, value
 Total runtime: 10351.989 ms
(9 rows)

hashes=# 

Thank you.

В списке pgsql-performance по дате отправления
От: Bruce Momjian
Дата:
От: Bruce Momjian
Дата:
FAQ