Darren Duncan wrote:
> Igor Tandetnik wrote:
>> Kristoffer Danielsson
>> <kristoffer.daniels...@live.se> wrote:
>>> When I create my own "stored procedures" using
>>> sqlite3_create_function, I get horrible performance (which I
>>> expected) even though the column of interest is INDEXED.
>>>
>>> Consider this sample (it's stupid, but it shows my problem):
>>>
>>> SELECT * FROM MyTable WHERE IS_MY_BIRTHDAY(IndexedDate);
>>>
>>> IS_MY_BIRTHDAY returns 1 when the date is my birthday. Now, inside
>>> this function, if I encounter a date greater than my birthday, then
>>> I want to tell SQLite to stop searching, since the date is indexed.
>>
>> I'm not sure what you mean by "a date greater than my birthday".
>> Presumably, your birthday comes every year, so every date is either
>> your birthday or falls between two birthdays (except dates before
>> the date
>> you were actually born on, but those can't be greater than any of
>> your
>> birthday dates).
>
> Another meaning for birthday is the the day in history where one was
> born, and there is just one of these per person.  More often this is
> what people are
> talking about when they are dealing with dates having a year part.

With this interpretation, having a function IS_MY_BIRTHDAY(IndexedDate) 
doesn't make much sense. In any case, one part of my response deals with 
this possibility.

Igor Tandetnik



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to