Re: Huge Data

Поиск
Список
Период
Сортировка
От Shridhar Daithankar
Тема Re: Huge Data
Дата
Msg-id 200401141832.45416.shridhar_daithankar@persistent.co.in
обсуждение исходный текст
Ответ на Re: Huge Data  (Sezai YILMAZ <sezai.yilmaz@pro-g.com.tr>)
Список pgsql-general
On Wednesday 14 January 2004 18:09, Sezai YILMAZ wrote:
> Richard Huxton wrote:
> >PG uses MVCC to manage concurrency. A downside of this is that to verify
> > the exact number of rows in a table you have to visit them all.
> >
> >There's plenty on this in the archives, and probably the FAQ too.
> >
> >What are you using the count() for?
>
> select logid, agentid, logbody from log where logid=3000000;

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 по дате отправления:

Предыдущее
От: "Bill McMilleon"
Дата:
Сообщение: Tool to ease development of plpgsql
Следующее
От: Bill Gribble
Дата:
Сообщение: Re: check date validity