Take the 2-minute tour ×
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 developed one function in my PostgreSQL database. It was taking 12-15 seconds to execute.

Now I have restored a new PostgreSQL 9.0 dump using following command:

pg_restore -hx.x.x.x -p5432 -d xxx -Ux -Fc -v </path/pgbackup.backup

but on this newly restored database it takes 2 minutes to execute same function.

Please give me possible way to sort out this problem.

share|improve this question
1  
How did you take the backup? Are indexes also recreated? Also, what does your function do? Is there a part you suspect being slow (like a select from a table or the like)? –  dezso Sep 4 '13 at 8:09
1  
Run ANALYZE and try again. –  MatheusOl Sep 5 '13 at 1:03
    
Please post EXPLAIN ANALYZE output so we can see the query plan used. –  Chris Travers Nov 13 '13 at 6:39
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.