Search Postgresql Archives

Re: Controlling complexity in queries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/12/2011 09:15 AM, David Johnston wrote:
Use a WITH clause on the SELECT statement.
Note that WITH is an optimisation fence, so if you're relying on Pg pushing WHERE clauses down into subqueries or anything like that you may find that your query runs a LOT slower when broken up as WITH expressions.

There's been talk of a Pg extension that allows optimisation through WITH, but it's not currently possible.

Another option is to wrap things up in SQL functions or views.

--
Craig Ringer

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux