Search Postgresql Archives

Re: Optimizing projections containing unused columns

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

 



Tom,

This question is too vague to be answerable --- especially if you want
an answer that applies across all 8.x releases.  I'd suggest
experimenting a bit using EXPLAIN ANALYZE to see what happens in your
actual application.

Thank you very much.
I cannot experiment with application currently since this part is at planning state.
I asked this to get right designing direction.

OK, I will create applicaton so that inner WHERE clauses contain as much restrictions as it is possible without adding additional tables to inner SELECTs. Hopefully this cannot be slower than moving those restrictions to outer select.

A third related issue:

Is it OK to use 5 levels of nested queries like

SELECT ...
 FROM ...
  (SELECT ..       FROM  ...
      (SELECT ... FROM ..
   ...
   )  p1
   ) p2

or is it better to create queries with as few levels of nestings as possible ? In some cases we have selection to use UNIONS, JOINS and CREATE TEMP TABLE x ON COMMIT DROP clauses instead of nested queries but
nested queries look more natural to create.

Currently we are planning to support servers starting at 8.0 so we are not planning to use WITH statement.

Andrus

--
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