Search Postgresql Archives

WITH <table> SELECT * FROM function(<table>) WHERE etc

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

 



Dear list,

Say, I wish to have a function returning a record, taking a row as parameter. However, from a performance perspective, I wish to be able to perform this query only on a subset by using a WHERE-clause.

I can only think of the following approach:

WITH ss AS ( SELECT * FROM my_table) SELECT * FROM my_function(ss) WHERE ss.field1 > 100

Question is: does the optimizer apply this WHERE-clause to the WITH-SELECT (resulting in "ss")?


Rob

[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