Re: performance problems on Delete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Silvio Brandani  wrote:
 
> we have a performance issue on deleting data from a table.
>
> the delete is on the index key so should be very fast but the table
> have 13 contraints of type foreign keys and the slowness seems due
> to all the works done with the constraint.
> Trying to drop the constraint and execute the delete the result is
> immediate.
 
The usual reason for this is that you don't have indexes on the
referencing columns, so to check whether the delete is OK it has to
scan the related tables.  Think about what rows need to be checked to
determine whether the delete is allowed and index the columns which
will allow fast access to them.
 
-Kevin

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux