very slow query

Поиск
Список
Период
Сортировка
От Ashish Karalkar
Тема very slow query
Дата
Msg-id 884154.78735.qm@web94308.mail.in2.yahoo.com
обсуждение исходный текст
Ответы Re: very slow query  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: very slow query  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-general
Hi,
I am having PostgreSQL 8.2.4 on Suse 10.3

Server is not using the index insted it chooses to take seq scan path. table is having @ 120 million rows

here is the output from planner:
Nested Loop IN Join  (cost=0.00..5030217.97 rows=2 width=106)
   ->  Seq Scan on sms_new  (cost=0.00..5027902.00 rows=384 width=106)
         Filter: (mobile = 919820920858::bigint)
   ->  Index Scan using deliveryid_pkey on delivery  (cost=0.00..6.02 rows=1 width=8)
         Index Cond: ("outer".deliveryid = delivery.deliveryid)
         Filter: ((createddate > '2007-12-11 00:00:00'::timestamp without time zone) AND (createddate < '2007-12-11 21:00:00'::timestamp without time zone) AND ((keyword)::text = 'CRI'::text))

column deliveryid has an index over it in sms_new table.

can anybody please guide to force the usage of index

Thanks in advance
With Regards
Ashish






Get the freedom to save as many mails as you wish. Click here to know how.

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Hijack!
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: Hijack!