On Sun, Jul 09, 2006 at 20:35:39 -0700, nuno <wegein@xxxxxxxxx> wrote: > hi there. > > i'm trying to clear data in a table but somehow it takes way too much > time than i once expected (i'm using the formal 'delete from xxx' type > of query.). > > this table's got several foreign keys and i suspect that is why it > takes longer than expected. If there are foreign keys referencing the table you are deleting from, then it can be very benificial to have indexes on those tables. Having an index on the table you are deleting from isn't useful when deleting all of the rows in the table. > > my question is that > would having indexes increase query performance when clearing tables? > or could anyone suggest me any ways to increase performance of the > query in such cases? > > thanks very much. > > regards, nuno > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org