From: | "Schlobohm, Jack" <SchlobohmJ(at)DNB(dot)com> |
---|---|
To: | "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org> |
Subject: | RE: |
Date: | 2000-10-30 12:52:28 |
Message-ID: | 15E3AECB85501-01@WorldSecure_Server__smtp-gw.us.dnb.com_ |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Can I be removed from this mailing list?
> -----Original Message-----
> From: Yury Don [SMTP:yura(at)vpcit(dot)ru]
> Sent: Monday, October 30, 2000 6:55 AM
> To: pgsql-sql(at)postgresql(dot)org
> Subject: Re: [SQL]
>
> Hello Lengyel,
>
> Once, Monday, October 30, 2000, 5:36:23 PM, you wrote:
>
> LF> Hello everybody!
> LF> I need some help with a simple query.
> LF> I've got a problem with getting a maximum value from a very large
> table
> LF> (10000000+ rows):
> LF> I have table:
> LF> CREATE TABLE TABLE_A
> LF> (
> LF> COL1 INT,
> LF> COL2 INT,
> LF> CONSTRAINT PK PRIMARY KEY (COL1, COL2)
> LF> )
>
> LF> and when I want to get the maximum value for col1:
> LF> SELECT MAX(COL1) FROM TABLE_A WHERE COL2 = 1
> LF> it takes a large amount of time.
> LF> I created an index on column COL1, but it doesn't work.
>
> You need to create index on COL2.
>
> --
> Best regards,
> Yury ICQ 11831432
> mailto:yura(at)vpcit(dot)ru
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Yury Don | 2000-10-30 12:55:04 | Re: |
Previous Message | Alessandro Rossi | 2000-10-30 12:42:50 | Large Object dump ? |