Igor Tandetnik wrote:
> Angus March wrote:
>   
>> Igor Tandetnik wrote:
>>     
>>> Angus March wrote:
>>>
>>>       
>>>> I have a table where I need to record the date of each insert.
>>>> Sometime later I'll then delete all rows that were inserted more
>>>> than 90 days ago. Is it possible to do this w/out performing a
>>>> table scan?
>>>>
>>>>         
>>> Create an index on the date column.
>>>
>>>       
>>    You're sure that's all there is to it? I haven't been able to make
>> use of the EXPLAIN results.
>>     
>
> Have you tried EXPLAIN QUERY PLAN?
>   
    I sure have. That tends to say too little.
>> How do you express dates that are older than 90
>> days ago?
>>     
>
> WHERE mydatecol < date('now', '-90 days')
>
>   
    Thanks, I'll give it a try.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to