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]

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to