From: "Cao Duy" <cao(dot)duy(at)1und1(dot)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