On 28 Sep 2011, at 3:52pm, Petite Abeille wrote:
> On Sep 28, 2011, at 4:48 PM, Puneet Kishor wrote:
>
>> But, if I understood [http://www.sqlite.org/datatype3.html] correctly, there
>> really is no such thing as DATETIME value. Internally, it is stored as TEXT
>> anyway.
>
> Or as a number.
On 28 Sep 2011, at 3:48pm, Puneet Kishor wrote:
> Could I? Sure, if I had known better. Should I? I would be happy to create a
> new column, convert the values to julian days, and try that, but on a 27 GB
> db, that would take a bit of a while.
You only have to do it once, you can do it
On Sep 28, 2011, at 4:48 PM, Puneet Kishor wrote:
> But, if I understood [http://www.sqlite.org/datatype3.html] correctly, there
> really is no such thing as DATETIME value. Internally, it is stored as TEXT
> anyway.
Or as a number. Your choice:
• TEXT as ISO8601 strings ("-MM-DD
On Sep 28, 2011, at 9:44 AM, Simon Slavin wrote:
>
> On 28 Sep 2011, at 3:41pm, Puneet Kishor wrote:
>
>> WHERE Datetime(u.downloaded_on) >= Datetime(p.project_start)
>
> Why are you doing 'Datetime' here ? Not only does the conversion take time,
> but it means you can't usefully index
On 28 Sep 2011, at 3:41pm, Puneet Kishor wrote:
>WHERE Datetime(u.downloaded_on) >= Datetime(p.project_start)
Why are you doing 'Datetime' here ? Not only does the conversion take time,
but it means you can't usefully index either of those two columns.
Can you instead store your stamps
On Sep 28, 2011, at 8:02 AM, Black, Michael (IS) wrote:
> Have you done "ANALYZE"? That might help.
>
> Also...try to arrange your joins based on record count (both high-to-low and
> low-to-high) and see what difference it makes.
>
> Since you have only one WHERE clause I'm guessing having
Have you done "ANALYZE"? That might help.
Also...try to arrange your joins based on record count (both high-to-low and
low-to-high) and see what difference it makes.
Since you have only one WHERE clause I'm guessing having project_ids as the
first join makes sense.
Michael D. Black
Senior
7 matches
Mail list logo