Forum OpenACS Development: Response to ACS 4.x won't scale (I hope I am wrong)

Collapse
Posted by Don Baccus on
I'm curious - did you ANALYZE the tables before running your timings of two versions (JOIN vs. IN) of the group queries?  Did you take a look at the output of EXPLAIN?

I have a lot more experience with PG and know that in that RDBMS JOINS will normally be a *lot* faster than IN.  There's been a lot of work done to optimize joins and none to optimize the kind of IN expression you've written here.

I'd like to get a handle on when it's better to do JOIN vs. IN in Oracle.  Having the Oracle version of a PL/SQL function perform queries differently than a PL/pgSQL function is OK (if properly documented so a future hacker doesn't come along and realign them for aesthetic reasons).

But things like this sure wreak havoc with our efforts to share SQL92-compliant queries unchanged in Query Files ...