Remove from tablename takes an abnormally long

I have a table in sql server 2005 with a chaild table in which there are millions of records. Whenever I issue the delete command even with the where clause, it takes an abnormally long time to execute. Does it depend on the size of the child table that causes this delay? What are the ways to speed up query deletion?

Thanks, Sweta.

+3
source share
2 answers

Usual suspects:

  • Trigger?
  • Column (column) index in a WHERE? Clause
  • Pointer to FL columns in FK column of child table?
  • Cascade delete, etc .: see index points.

also:

  • does the log file grow?
  • ...

Edit, after comments: you need indexes ...

+3
source

, . , .

+2

Source: https://habr.com/ru/post/1734511/


All Articles