Re: Huge Data

Поиск
Список
Период
Сортировка
От Shridhar Daithankar
Тема Re: Huge Data
Дата
Msg-id 200401141837.07629.shridhar_daithankar@myrealbox.com
обсуждение исходный текст
Ответ на Re: Huge Data  ("Matthew Lunnon" <mlunnon@rwa-net.co.uk>)
Ответы Re: Huge Data  (Sezai YILMAZ <sezai.yilmaz@pro-g.com.tr>)
Список pgsql-general
On Wednesday 14 January 2004 18:22, Matthew Lunnon wrote:
>   select logid, agentid, logbody from log where logid=3000000;
>
>   this query also returns after about 120 seconds. The table log has about
>   7 million records, and logid is the primary key of log table. What about
>   that? Why is it too slow?

How about

select logid, agentid, logbody from log where logid='3000000';

or

select logid, agentid, logbody from log where logid=3000000::int4;

Basically you need to typecast the constant. Then it would use the index.

I am not sure of first form of it though. I recommend you use the later form.

 Shridhar


В списке pgsql-general по дате отправления:

Предыдущее
От: "Matthew Lunnon"
Дата:
Сообщение: Re: Huge Data
Следующее
От: Együd Csaba
Дата:
Сообщение: Re: Using regular expressions in LIKE