Re: simple select-statement takes more than 25 sec

Поиск
Список
Период
Сортировка
От gnari
Тема Re: simple select-statement takes more than 25 sec
Дата
Msg-id 000501c4c710$774bb170$0100000a@wp2000
обсуждение исходный текст
Ответ на simple select-statement takes more than 25 sec  (Cao Duy <cao.duy@1und1.com>)
Список 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 по дате отправления:

Предыдущее
От: "Steinar H. Gunderson"
Дата:
Сообщение: Re: simple select-statement takes more than 25 sec
Следующее
От: Cao Duy
Дата:
Сообщение: Re: simple select-statement takes more than 25 sec