Re: [PERFORM] [GENERAL] Query is not using index when it should

2004-12-12 Thread Tomas Skäre
"Steinar H. Gunderson" <[EMAIL PROTECTED]> writes: > On Sat, Dec 11, 2004 at 03:17:13PM +0100, Tomas Skäre wrote: > > select c.* from cjm_object c > > inner join > > (select max(timestamp) as timestamp,objectid,field from cjm_object > >group by objectid,field) t > > using(timestamp,object

Re: [PERFORM] [GENERAL] Query is not using index when it should

2004-12-11 Thread Michael Fuhr
On Sat, Dec 11, 2004 at 03:32:13PM +0100, Steinar H. Gunderson wrote: > On Sat, Dec 11, 2004 at 03:17:13PM +0100, Tomas Skäre wrote: > > select c.* from cjm_object c > > inner join > > (select max(timestamp) as timestamp,objectid,field from cjm_object > >group by objectid,field) t > > usin

Re: [PERFORM] [GENERAL] Query is not using index when it should

2004-12-11 Thread Steinar H. Gunderson
On Sat, Dec 11, 2004 at 03:17:13PM +0100, Tomas Skäre wrote: > select c.* from cjm_object c > inner join > (select max(timestamp) as timestamp,objectid,field from cjm_object >group by objectid,field) t > using(timestamp,objectid,field) > where 1=1 and data is not null > order by objectid

Re: [PERFORM] [GENERAL] Query is not using index when it should

2004-12-11 Thread Tomas Skäre
Stephan Szabo <[EMAIL PROTECTED]> writes: > On Fri, 10 Dec 2004, Tomas [iso-8859-1] Skäre wrote: > > > I have a table that looks like this: > > > > Table "public.cjm_object" > > Column | Type| Modifiers > > ---+---+--- > > timestamp | bi

Re: [PERFORM] [GENERAL] Query is not using index when it should

2004-12-10 Thread Stephan Szabo
On Fri, 10 Dec 2004, Tomas [iso-8859-1] Skäre wrote: > I have a table that looks like this: > > Table "public.cjm_object" > Column | Type| Modifiers > ---+---+--- > timestamp | bigint| not null > jobid | bigint