Mark Lewis <[EMAIL PROTECTED]> writes:
> I had a similar problem, so I downloaded 8.1 from CVS, ran it on a
> relatively gnarly dev workstation, imported a dump of my 8.0 database,
> and ran my troublesome queries with the new EXPLAIN ANALYZE.

> This process took about an hour and worked great, provided that you've
> actually named your foreign key constraints.  Otherwise, you'll find out
> that there's a trigger for a constraint called $3 that's taking up all
> of your time, but you won't know what table that constraint is on.

But at least you've got something you can work with.  Once you know the
name of the problem trigger you can look in pg_trigger to see which
other table it's connected to.  Try something like

        select tgname, tgconstrrelid::regclass, tgargs from pg_trigger
        where tgrelid = 'mytable'::regclass;

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to