Bug 2488

Summary: SQL: dynamic selectivity optimiser required
Product: SQL Reporter: Stefan de Konink <skinkie>
Component: allAssignee: SQL devs <bugs-sql>
Status: NEW ---    
Severity: enhancement    
Priority: ---    
Version: -- development   
Hardware: x86 (i?86)   
OS: Linux   
URL: http://sourceforge.net/support/tracker.php?aid=2704025

Description Stefan de Konink 2009-03-22 20:42:21 CET
Using the OSM dataset I noticed there is a significant difference in the following queries:

select * from way_tags where way = 9168360 and k = 'created_by';
Timer   10583.483 msec 2 rows

vs

select * from way_tags where k = 'created_by' and  way = 9168360;
Timer     331.086 msec 2 rows

(this is not about hot/cold performance, the next try of the first query results in 10286.816 msec)

Niels noted that this could be solved automatically using a dynamic selectivity optimiser. I first noticed this issue using delete from.
Comment 1 Martin Kersten cwiconfidential 2009-03-22 20:51:23 CET
such an optimizer is a feature request, rather then a bug.
Comment 2 Pseudo user for Sourceforge import 2010-05-04 09:32:09 CEST
This bug was previously known as tracker item 2704025 at http://sourceforge.net/support/tracker.php?aid=2704025