Re: [GENERAL] Re: Poor performance - need advice

From: "Mark Alliban" <MarkA(at)idnltd(dot)com>
To: "Culberson, Philip" <philip(dot)culberson(at)dat(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] Re: Poor performance - need advice
Date: 2000-02-03 09:22:15
Message-ID: 005601bf6e28$29e34290$c80110ac@centauri
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thnks Phil,

You hit the nail on the head. Problem solved :)

Mark.

>I'm pretty sure I have seen a similar post before. The problem is that
>Postgres assumes the constant you are using is an int4. Try casting it to
>int8 and see if that helps.
>
>SELECT * FROM ClientTable WHERE ClientNumber=1234566789::int8;
>
>
>Phil Culberson
>DAT Services
>
>-----Original Message-----
>From: Mark Alliban [mailto:MarkA(at)idnltd(dot)com]
>Sent: Wednesday, February 02, 2000 10:16 AM
>To: pgsql-general(at)postgresql(dot)org
>Subject: [GENERAL] Re: Poor performance - need advice
>
>
>>We have a table with 95,000 records, indexed on an int8 type
>(ClientNumber).
>>It is currently taking up to 10 seconds to retrieve one row based upon the
>>following statement:
>>
>>SELECT * FROM ClientTable WHERE ClientNumber=1234566789;
>>
>>The client numbers are random and there is currently no locking on the
>>database. I am running SCO OpenServer, PostgreSQL version 6.5.3. Is there
>>any way we can reduce the time taken by this query?
>
>
>I have tried an EXPLAIN of the above statement, and it tells me that
>Postgres is doing a Seq Scan on the table to return the results, even
though
>it should be using the index. How can I make sure that it will always use
>the index when I specify ClientNumber?
>
>
>************
>
>************
>

Browse pgsql-general by date

  From Date Subject
Next Message Hannu Krosing 2000-02-03 10:00:20 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Previous Message Chris 2000-02-03 09:17:10 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL