Re: What query optimisations are included in Postgresql?

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "N *EXTERN*" <ceecmm(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: What query optimisations are included in Postgresql?
Date: 2013-11-29 12:58:27
Message-ID: A737B7A37273E048B164557ADEF4A58B17C6D80C@ntex2010a.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

N wrote:
> Are there documents specifying the query optimisations in Postgresql
> like the SQLite (http://www.sqlite.org/optoverview.html)?
>
> From the web, I can say, there are index and join optimisation, but
> are there anything others like Subquery flattening?

There is subquery flattening:

test=> EXPLAIN SELECT id1 FROM t1 WHERE EXISTS (SELECT 1 FROM t2 WHERE id2 = id1);
QUERY PLAN
---------------------------------------------------------
Nested Loop Semi Join (cost=0.00..2.03 rows=1 width=4)
Join Filter: (t1.id1 = t2.id2)
-> Seq Scan on t1 (cost=0.00..1.01 rows=1 width=4)
-> Seq Scan on t2 (cost=0.00..1.01 rows=1 width=4)
(4 rows)

I guess that the reason why there is no such list is that there
are so many query optimizations that it would be difficult to
list them all. And things are improving from release to release.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2013-11-29 16:33:42 Re: [GENERAL] pg_upgrade ?deficiency
Previous Message Albe Laurenz 2013-11-29 12:44:55 Re: Error pg_standby 'pg_standby' is not recognized as an internal or external command!!