From: | "Ravi T Ramachandra" <ravi(dot)ramachandra(at)wipro(dot)com> |
---|---|
To: | "Bruno Wolff III" <bruno(at)wolff(dot)to> |
Cc: | <pgsql-admin(at)postgresql(dot)org>, "Sandeep Bhasin" <sandeep(dot)bhasin(at)wipro(dot)com> |
Subject: | Re: Performance Issues |
Date: | 2003-09-09 07:57:30 |
Message-ID: | 4223A04BF7D1B941A25246ADD0462FF5D2727A@blr-m3-msg.wipro.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Thanks Bruno and Nathan for your responses. The integer column was a
SMALLINT and for some reason, postgres doesn't do index lookup for
smallint. When we changed the column from smallint to int, it is
making lots of differences.
Regards,
Ravi
-----Original Message-----
From: Bruno Wolff III [mailto:bruno(at)wolff(dot)to]
Sent: Monday, September 08, 2003 6:43 PM
To: Ravi T Ramachandra
Cc: pgsql-admin(at)postgresql(dot)org; Sandeep Bhasin
Subject: Re: [ADMIN] Performance Issues
On Mon, Sep 08, 2003 at 11:43:42 +0530,
Ravi T Ramachandra <ravi(dot)ramachandra(at)wipro(dot)com> wrote:
>
> SELECT * FROM TABLE A WHERE COL1 = 1 AND COL2 = 'ABC'.
>
> We have created index definition as follows
>
> CREATE INDEX IDX ON A(COL1, COL2);
>
> Explain on the above statement shows it is sequential scan. The
> process size for the postmaster shows as 4MB (is this normal ?)
While Nathan's advice may be useful for you, it probably isn't causing
the problem you are seeing. Your problem is most likely that COL isn't
an INTEGER (aka INT or INT4). Try using single quotes around '1'.
**************************Disclaimer************************************
Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged' and 'confidential' and intended for use only by the individual
or entity to which it is addressed. You are notified that any use, copying
or dissemination of the information contained in the E-MAIL in any manner
whatsoever is strictly prohibited.
***************************************************************************
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Gordon | 2003-09-09 14:22:08 | How to create schema-specific users? |
Previous Message | Gaetano Mendola | 2003-09-08 22:17:40 | Re: Duplicate key |