Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have many databases on the same server, all with same templates. When I execute truncate command on exceptions table in each database, it works fine and executes immediately but on database named db_edr_s1 the same truncate command on exceptions table is taking too much, approx. 5 minutes.

The version is 9.1.

Any other info needed?

share|improve this question
Is the table being used by any other process simultaneously? – Vaibhav Desai Feb 27 at 6:31
no this table is accessed by single script only. and same happen when I try this from psql command line without any script running. – sharafjaffri Feb 27 at 6:57
1  
What do you get from SELECT * FROM pg_locks WHERE relation = 'exceptions'::regclass::oid? – dezso Feb 27 at 10:22

migrated from stackoverflow.com Feb 27 at 8:49

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.