Search Postgresql Archives

Re: Problem with left join when moving a column to another table

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

 



Jason Long-2 wrote
> Does the syntax you showed me have performance benefits vs joining a
> bunch of views together?

As a general rule CTE/WITH is going to be worse performing than the
equivalent view definition - depending on the view is actually used in the
query of course.  They both have their place.  A CTE/WITH is basically a
per-query VIEW though there is an optimization barrier that doesn't allow
the main query WHERE clause to limit the queries like it a view would
normally allow if possible.  Because of this I'll occasionally find need to
specify redundant where clauses inside the CTE to get decent performance on
large tables - mostly for my interactive queries.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Problem-with-left-join-when-moving-a-column-to-another-table-tp5760187p5760255.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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