Feature Requests item #2926187, was opened at 2010-01-05 12:45
Message generated for change (Comment added) made by mlkersten
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482471&aid=2926187&group_id=56967
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL - general
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Stefan de Konink (skinkie)
Assigned to: Nobody/Anonymous (nobody)
Summary: SQL: increase cost of a like operation
Initial Comment:
It seems in a query like:
explain select kvk from kvk where length('hello') = length(bedrijfsnaam) and
bedrijfsnaam like '%hello%';
The like operation is before the length, I have attached the mal explain of it.
This is the plan:
project (
| select (
| | table(sys.kvk) [ kvk.kvk, kvk.bedrijfsnaam, kvk.%TID% NOT NULL ]
| ) [ length(kvk.bedrijfsnaam) = length('hello'), convert(kvk.bedrijfsnaam)
like convert('%hello%') ]
) [ kvk.kvk ]
If like is indeed before the length equality function (it seems to be finished
after the 2nd barrier), shouldn't the cost for the like operation be increased?
----------------------------------------------------------------------
>Comment By: Martin Kersten (mlkersten)
Date: 2010-01-05 13:29
Message:
Optimizers generally do not have any knowlegde about the cost of
(user-defined) functions. MonetDB does not use a cost-based reordering of
the plan either to benefit from this specific case.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482471&aid=2926187&group_id=56967
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs