Re: Select retrieval slowdown after db drop/reload. Suggestions?
От | Scott Marlowe |
---|---|
Тема | Re: Select retrieval slowdown after db drop/reload. Suggestions? |
Дата | |
Msg-id | 1172701380.20651.159.camel@state.g2switchworks.com обсуждение исходный текст |
Ответ на | Select retrieval slowdown after db drop/reload. Suggestions? (Andrew Edson <cheighlund@yahoo.com>) |
Список | pgsql-general |
On Wed, 2007-02-28 at 13:55, Andrew Edson wrote: > I have a select statement, used in a Perl program, which is supposed > to find all records related to those in one table which have a > delete_dt field value of four years or older. > > This is the select statement: > SELECT t2.dist_id, t1.clnt_seq, t2.cntrct_seq, t2.cntrct_id, > t3.aunit_seq, t1.person_seq, t1.addr_seq, t3.addr_seq, t4.frst_nm || ' > ' || t4.lst_nm AS name, t5.addr_1, t6.acntdel_dt FROM t1, t2, t3, t4, > t5, t6 WHERE t1.clnt_seq = t2.clnt_seq AND t2.cntrct_seq = > t3.cntrct_seq AND t3.aunit_seq = t6.aunit_seq AND t1.person_seq = > t4.person_seq AND t3.addr_seq = t5.addr_seq AND t1.active_flg =0 AND > t2.active_flg =0 AND t3.active_flg = 0 AND t6.acntdel_dt < now() - '4 > years'::interval order by t2.cntrct_id asc; What version of pgsql are you running? Is acntdel_dt indexed? What does explain (and maybe explain analyze) for this query say? What does it say on your other boxes?
В списке pgsql-general по дате отправления: