Results 1 to 2 of 2

Thread: What is fastest

  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Question Unanswered: What is fastest

    Is it better to do :

    insert into ndb_TBONE select o.* from TBONE@oldb o , ndb_TBTWO ot
    where o.FIELD = ot.FIELD;

    or

    insert into ndb_TBONE select o.* from TBONE@oldb o
    where o.FIELD IN (SELECT FIELD FROM TBTWO)

    or

    insert into ndb_TBONE select o.* from TBONE@oldb o
    where o.FIELD EXISTS (SELECT FIELD FROM TBTWO)

  2. #2
    Join Date
    Oct 2003
    Posts
    2

    Re: What is fastest

    Originally posted by thelastdbock
    Is it better to do :

    insert into ndb_TBONE select o.* from TBONE@oldb o , ndb_TBTWO ot
    where o.FIELD = ot.FIELD;

    or

    insert into ndb_TBONE select o.* from TBONE@oldb o
    where o.FIELD IN (SELECT FIELD FROM TBTWO)

    or

    insert into ndb_TBONE select o.* from TBONE@oldb o
    where o.FIELD EXISTS (SELECT FIELD FROM TBTWO)
    I found out that the 1st is the best if fields are indexed
    The 3rd is good if you had (SELECT FIELD FROM TBTWO WHERE FIELD=O.FIELD

Posting Permissions

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