On 21 December 2016 at 12:51, Yogesh Sharma <yogeshraj95@xxxxxxxxx> wrote: > Dear Alban, > > In my production system, there are lot of read write operation performed > every hour. That does not explain why you're performing REINDEX on that system; rather, it explains why you should NOT be performing REINDEX. VACUUM is what you should be using. You can VACUUM either using autovacuum with a sufficiently high frequency that it doesn't fall behind too much, or by manually running VACUUM ANALYSE on specific tables after batch operations. Which choice suits you best depends on your workload. In batches it is often also useful to run (plain) ANALYSE every so often on the relevant tables to update the statistics, but only when the batch process is not insert-only. > So, i am thinking, if i can add check during REINDEX operation nothing > update and insert operation performed. > Is it possible? I have no idea what you're saying. > On Wednesday, December 21, 2016, Alban Hertroys <haramrae@xxxxxxxxx> wrote: >> >> On 21 December 2016 at 09:59, Yogesh Sharma <yogeshraj95@xxxxxxxxx> wrote: >> > Also, every hour,i am performing VACUUM and REINDEX operation on table. >> >> Why are you running REINDEX every hour? That's a very unusual thing to >> do, you'd need a pretty good reason for that. >> >> -- >> If you can't see the forest for the trees, >> Cut the trees and you'll see there is no forest. -- If you can't see the forest for the trees, Cut the trees and you'll see there is no forest. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general