should I reindex the table of more than 10 millions rows regularly when more data are inserted?

Started by zxo102 ouyangabout 16 years ago2 messagesgeneral
Jump to latest
#1zxo102 ouyang
zxo102@gmail.com

Hi everyone,
I have a big table (more than 10 millions rows) and create an index
(three columns) ( the index is not created with creating the table). Within
one day of the index created, the performance of query searching is ok. But
with more than several thousands rows of data inserted into the table,
query searching becomes slower and slower.
Should I recreate the index regularly when more data are inserted into
the table?

Thanks for your help in advance.

ouyang

#2Szymon Guz
mabewlun@gmail.com
In reply to: zxo102 ouyang (#1)
Re: should I reindex the table of more than 10 millions rows regularly when more data are inserted?

2010/3/7 zxo102 ouyang <zxo102@gmail.com>

Hi everyone,
I have a big table (more than 10 millions rows) and create an index
(three columns) ( the index is not created with creating the table). Within
one day of the index created, the performance of query searching is ok. But
with more than several thousands rows of data inserted into the table,
query searching becomes slower and slower.
Should I recreate the index regularly when more data are inserted into
the table?

Thanks for your help in advance.

ouyang

Do you have autovacuum running? And of course show the execution plans for
the fast and the slow query (using explain analyze).