Can somebody explain what is the meaning for HashAggregate?

From: lin <jluwln(at)163(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Can somebody explain what is the meaning for HashAggregate?
Date: 2015-09-20 13:56:39
Message-ID: 60e52136.c16e.14feb0ad2db.Coremail.jluwln@163.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Can somebody explain what does the postgres done for the explain of sql shows HashAggregate( what is the meaning for HashAggregate )?
for example:

postgres=# explain verbose select oid,relname from pg_class group by oid,relname;
QUERY PLAN
-----------------------------------------------------------------------------
HashAggregate (cost=12.42..15.38 rows=295 width=68)
Output: oid, relname
Group Key: pg_class.oid, pg_class.relname
-> Seq Scan on pg_catalog.pg_class (cost=0.00..10.95 rows=295 width=68)
Output: oid, relname
(5 rows)

:: first, seq scan pg_class and return (oid,relname);
second, make group (oid,relname), is it fisrt sort by oid then in the oid group sort by relname?
Can somebody explain what does the database done for hashAggregate?

Thanks,
wanglin

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2015-09-20 14:27:07 Re: Can somebody explain what is the meaning for HashAggregate?
Previous Message Juan Pablo L. 2015-09-20 00:49:05 numeric