Felson <felson123(at)yahoo(dot)com> writes:
> I am on 7.0 I am plaing an upgade at the end of the
> week as I am getting a new server to put it on. As for
> rules, there are a number of indexs, and 2 forign key
> rules.
Ah-hah. I bet your problem is the foreign key rules. Make sure you
have indexes on both ends of each foreign-key reference (ie, both the
referencing and referenced columns need indexes). Also, vacuum analyze
both tables. Then start a fresh backend and see if it's any better.
(You need a fresh backend because the plans for foreign-key check
queries are cached.)
regards, tom lane