using of index Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: using of index

  1. #1
    Join Date
    Jan 2001


    hi all,

    i had a delete statement like this in a trigger

    delete from histo where num <(b1 -30000)
    b1 is a parameter coming from a sequence

    there's an index on num and only on that colum which is the primary key

    when i look at the plan he always do a full table scan to delete

    why ? is it coming from the parameters

  2. #2
    Join Date
    Aug 2001
    I am not sure, but here's what I learned from reading this forum.
    Bec. the FK is not index, when you do a delete from the
    parent table, oracle does a full tables scan on the child table for
    data integrity purposes. You can truncate your child table or have FK on your child table index.

    [Edited by tekion on 02-06-2002 at 02:02 PM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width