Re: simple select-statement takes more than 25 sec - Mailing list pgsql-performance

From gnari
Subject Re: simple select-statement takes more than 25 sec
Date
Msg-id 000501c4c710$774bb170$0100000a@wp2000
Whole thread Raw
In response to simple select-statement takes more than 25 sec  (Cao Duy <cao.duy@1und1.com>)
List pgsql-performance
From: "Cao Duy" <cao.duy@1und1.com>
>
> here is my simple select-statement:
> SELECT * FROM CUSTOMER WHERE CUSTOMER_ID=5
>
> the result appears after about 27 sec.
>
> what's wrong?
> ...
> CREATE TABLE public.customer
> (
>   customer_id bigserial NOT NULL,

you do not specify version or show us
an explain analyze, or tell us what indexes
you have, but if you want to use an index
on the bigint column customer_id, and you
are using postgres version 7.4 or less, you
need to cast your constant (5) to bigint.


try
SELECT * FROM CUSTOMER WHERE CUSTOMER_ID=5::bigint
or
SELECT * FROM CUSTOMER WHERE CUSTOMER_ID='5'

gnari



pgsql-performance by date:

Previous
From: "Steinar H. Gunderson"
Date:
Subject: Re: simple select-statement takes more than 25 sec
Next
From: Cao Duy
Date:
Subject: Re: simple select-statement takes more than 25 sec