Re: [sqlite] Problem with ordering

2009-04-14 Thread BareFeet
Hi Lukáš, > And I've been trying to run the following query: > > sqlite> SELECT * FROM Event WHERE bringsSchedule = 0 AND > sourceMachine_id = 9 AND virtualClock <= 1000 AND parent_fk IS NOT > NULL ORDER BY id DESC LIMIT 1; > 835|29|0|309493|0|334|834|9|| > CPU Time: user 0.027995 sys 0.00

Re: [sqlite] Problem with ordering

2009-04-13 Thread Lukáš Petrovický
2009/4/14 John Machin : >> As you can see, it takes ages and it shouldn't. > > I can't see ... why are you measuring CPU time instead of elapsed time? > what is the unit of measure? nanoseconds or centuries? Oh, my apologies. The actual measuring happens in the code that queries the database and i

Re: [sqlite] Problem with ordering

2009-04-13 Thread John Machin
On 14/04/2009 6:29 AM, Lukáš Petrovický wrote: > Hello! > > I've been trying probably for ages to make the following work. I have > a table with following schema (most of the columns are irrelevant for > now): > > sqlite> .schema Event > CREATE TABLE Event (id integer, assignedCPUs varchar, brin