Skip to Content
0
Former Member
Apr 21, 2010 at 07:26 PM

script to discover what index create to speed up check of foreign keys.

26 Views

Hi,

Exists any script to run in maxdb to discover discover what index create to speed up check of foreign keys?

i have an idea how to create that based in how many rows a table have, then create an index to speed check of foreign keys violations, but i wish to know if MaxDB experts have a better idea about that.

ps: all my FK points to PK, but i noticed if i delete a row that many other tables have FK to this table, that sometimes causes lock table when checking FK, for example:

Order points to Invoice, both tables are big, if i dont have and index for that FK when i delete an invoice, i must wait maxdb check if any Order points back to that invoice, and in this time i get an table lock on Order, because maxdb must check every row of Order.

thanks for any tip.

best regards.

Clóvis