Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2007
    Posts
    1

    Red face Unanswered: Cartesian Joins in Oracle-Weird Behavior

    We have a statement that is supposedly creating a cartesian join ONLY when the W.LOCKEDBY field in greater than 6 characters! Anyone heard of that? If the W.LOCKEDBY is less than 6 characters then the statement runs fast but if it is larger then it runs slow!

    Here is the statement:

    SELECT /*+FIRST_ROWS*/ A.QUEUE, I.FD_WIRID, A.WORKITEMID, I.FD_DOC_OBJECT_HANDLE, i.fd_scan_date, I.fd_document_id as DocumentID, w.lockedby From III_FUEL_DATA I, ATWORKITEMREFERENCE A, ATWORKITEM W Where I.FD_WIRID = A.WORKITEMREFERENCEID AND W.WORKITEMID = A.WORKITEMID AND A.Queue = 'Fuel Tickets' AND A.SERVERREQUEST = 0 AND W.LOCKEDBY = 'wilkpmb' Order By I.fd_scan_date

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    You seem to be using the term "Cartesian Join" as a synonym for "slow"! If there were a Cartesian join then you would see more rows than expected in the output - is that the case?

    It could be that one of the joins is wrong, but happens to only find one matching row in the "parent" table when the ID is 6 chars or less - i.e. your data is different for those.

Posting Permissions

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