dbTalk Databases Forums  

Copy of DB behaves different from original

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss Copy of DB behaves different from original in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jason@soundconcept.net
 
Posts: n/a

Default Copy of DB behaves different from original - 09-01-2004 , 03:59 PM






Hi all,

I have a database that I made a copy of (useing pg_dump) to test a new
program on. The program runs just fine on the new(copy) database. However,
when I switched my program to run on my old(original) database it runs
around 10 times slower and takes up way more processor power. I tried
vacuumdb on the old database and it made no difference. Any idea what my
problem might be? I could just drop and restore the old database, but I
would really like to understand what might be going on so I could watch for
it in the future and hopefully prevent it from happening again.

Any information is greatly appreciated.

Jason Haselbauer
Soundconcept.net
jason (AT) soundconcept (DOT) net



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #2  
Old   
Steve Crawford
 
Posts: n/a

Default Re: Copy of DB behaves different from original - 09-01-2004 , 04:42 PM






On Wednesday 01 September 2004 1:59 pm, jason (AT) soundconcept (DOT) net wrote:
Quote:
Hi all,

I have a database that I made a copy of (useing pg_dump) to test a
new program on. The program runs just fine on the new(copy)
database. However, when I switched my program to run on my
old(original) database it runs around 10 times slower and takes up
way more processor power. I tried vacuumdb on the old database and
it made no difference. Any idea what my problem might be? I could
just drop and restore the old database, but I would really like to
understand what might be going on so I could watch for it in the
future and hopefully prevent it from happening again.

Any information is greatly appreciated.
If the original database isn't live then try a vacuum full on the old
database and be sure to analyze it as well (vacuumdb --full
--analyze). The standard vacuum does not physically shrink the
database files - it just makes no longer used space within the file
available for reuse. The --analyze will update the statistics the
planner uses when deciding how to approach the query (mainly use of
indexes).

If that doesn't do the trick, try reindexing the tables.

Cheers,
Steve

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.