On 4/29/15 12:32 AM, Mitu Verma wrote:
This script first does the indexing then it deletes the entries from the table. Now issue is that this script is taking lot of time and has acquired some locks also. Nor sure if it is happening due to indexing or what.
Mixing DDL with bulk DML operations is not a recipe for good concurrency. For that matter, running DDL on a recurring basis isn't good either.
BTW, you might want to look at using PgQ to do the queuing; it has different methods of maintaining it's queues so you don't run into these sort of problems.
-- Jim Nasby, Data Architect, Blue Treble Consulting Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general