Op 13 sep 2015, om 15:17 heeft Luuk het volgende geschreven:

>
>
> On 13-09-15 14:57, E.Pasma wrote:
>> The rowcounts were:
>>
>> 1) 999 - aurel's original version is 3.8.9
>> 2) 1000 - Luuks non-recursive version, same for my own trial
>> 3) 837 -the version with temp table
>> 4) 838 - DRH;s version
>>
>> and there is nothing to worry here.
>> The main difference is explained by a mistake in the format  
>> parameter to the strftime function. In (1) and (2) that was '%%w'  
>> which is meaningles. In (4) this is changed to '%w' and that  
>> effectively filters out the sundays. Thanks DRH for the comments  
>> that clarify this intention.
>> The remaining difference is because in (3) the final date is not  
>> incuded as start date on a seperate line. Still it is already there  
>> as end date.
>>
>
> i don't like Sundays....
> (https://www.youtube.com/watch?v=fl6I-D8GXqA)
>
> sqlite> select count(*) from securities where  
> strftime('%w',calc_date)<>0 ;
> 6301006
> Run Time: real 3.282 user 2.796875 sys 0.437500
> sqlite> select count(*) from securities where strftime('% 
> %w',calc_date)<>0 ;
> 6301006
> Run Time: real 3.187 user 2.640625 sys 0.546875
> sqlite>
>
> ;)
Still nothing to worry. I just learned that the strftime function  
returns '0' for Sundays, not 0, and that 0<>'0'.

That leaves us with the topic of recursive aggregate queries.


Reply via email to