Search Postgresql Archives

Using the query INTERSECTion

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

 



Hello everyone.

In order to build some dynamic queries (EXECUTE under PL/PgSQL)
I'm taking in consideration to use the INTERSECT operator in order
to split a WHERE-condition in a static one and a dynamic one to be
built at runtime.

Instead of

SELECT * FROM joinedtables WHERE static_cond AND dynamic_cond;

I could use:

SELECT * FROM joinedtables WHERE static_cond
  INTERSECT
SELECT * FROM joinedtables WHERE dynamic_cond

I'm wondering what'd be the difference in efficiency between these
two queries.

Is there any advise?

Many thanks in advance.

-- 
Vincenzo Romano
--
Maybe Computer will never become as intelligent as Humans.
For sure they won't ever become so stupid. [VR-1988]


[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