| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: union all vs. left outer join
In article <3ta67mFrii33U1_at_individual.net>,
Stefan Rybacki <stefan.rybacki_at_gmx.net> writes:
> henrik.sorensen_at_balcab.ch wrote:
>>> henrik.sorensen_at_balcab.ch wrote: >>> >>>> ... >>>> >>>> Any ideas, or hints would be much appreciated. >>>> >>>> Henrik >>> >>> Its not slow over here.
>>> Tested on postgreSQL 8
> yes
>> join with table D using index XDE,
> no its joining with table D but doesn't use an index (Seq Scan on d)
>> use the found set of D.bids to join
>> using matching indexes on C and B respectively, and finally join to the
>> matching records in A, also using indexes.
> what postgreSQL does is joining B with A then joins this result again > with C, but it doesn't use indices for this (see the output: Seq Scan > on c, Seq Scan on b, Seq Scan on a (this could be because of there are > no statistics and the query is still fast enough))
No, PostgreSQL does not (and should not) use indices because the tables are so small. I guess with large tables and proper statistics it'll switch to index scans. Received on Tue Nov 08 2005 - 04:37:16 CST
![]() |
![]() |