[postgis-devel] join selectivity

strk strk at keybit.net
Fri Dec 10 07:35:03 PST 2004


Taking a look at join selectivity...
For a query like this:

	SELECT id FROM table1, table2 
	WHERE table1.geom && table2.geom;

RESTRICT selectivity is invoked twice and
JOIN selectivity is invoked once.
The RESTRICT code is not able to find a costant part
and thus returns the default value (0.000005),
JOIN selectivity so far returns an hard-wired 0.1.

Questions:
(1) What should RESTRICT selectivity do in this case ?!
(2) Is JOIN selectivity a fraction of table2 X table1
    records ?

--strk;



More information about the postgis-devel mailing list