Re: [ADMIN] Query with Max, Order by is very slow.......

2004-04-07 Thread Tom Lane
Sam Barnett-Cormack <[EMAIL PROTECTED]> writes: > On Wed, 7 Apr 2004, Hemapriya wrote: >> Column |Type | Modifiers >> ---+-+--- >> origindb | character(1)| not null >> uid | integer | no

Re: [ADMIN] Query with Max, Order by is very slow.......

2004-04-07 Thread Bruno Wolff III
On Wed, Apr 07, 2004 at 14:03:54 -0700, Hemapriya <[EMAIL PROTECTED]> wrote: > Indexes: > "request_pkey" primary key, btree (origindb, uid) > > I do max Query like this > > select max(uid) from request where originDB=1; > > it took around 20 min to return the result.. Since > max, count

Re: [ADMIN] Query with Max, Order by is very slow.......

2004-04-07 Thread Sam Barnett-Cormack
On Wed, 7 Apr 2004, Hemapriya wrote: > Hi, > > we have table having 23 million rows. > This is the table structure. > Table Request: > > Column |Type | Modifiers > ---+-+--- > origindb | character(1)| not nul

[ADMIN] Query with Max, Order by is very slow.......

2004-04-07 Thread Hemapriya
Hi, we have table having 23 million rows. This is the table structure. Table Request: Column |Type | Modifiers ---+-+--- origindb | character(1)| not null uid | integer | not null