Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
SELECT 'wt.doc.WTDocument',A0.administrativeLockIsNull,A0.typeadministrativeLock,A0.blob$entrySetadHocAcl,A0.checkoutInfoIsNull,A0.statecheckoutInfo,A0.classnamekeycontainerReferen,A0.idA3containerReference,A0.department,A0.description,A0.docType,A0.classnamekeydomainRef,A0.idA3domainRef,A0.entrySetadHocAcl,A0.eventSet,A0.classnamekeyA2folderingInfo,A0.idA3A2folderingInfo,A0.classnamekeyB2folderingInfo,A0.idA3B2folderingInfo,A0.classnamekeyformat,A0.idA3format,A0.hasHangingChange,A0.hasPendingChange,A0.hasResultingChange,A0.hasVariance,A0.indexersindexerSet,A0.inheritedDomain,A0.iopStateinteropInfo,A0.stateinteropInfo,A0.branchIditerationInfo,A0.classnamekeyD2iterationInfo,A0.idA3D2iterationInfo,A0.classnamekeyE2iterationInfo,A0.idA3E2iterationInfo,A0.iterationIdA2iterationInfo,A0.latestiterationInfo,A0.classnamekeyB2iterationInfo,A0.idA3B2iterationInfo,A0.noteiterationInfo,A0.classnamekeyC2iterationInfo,A0.idA3C2iterationInfo,A0.stateiterationInfo,TO_CHAR(A0.datelock,'dd mm yyyy hh24:mi:ss'),A0.classnamekeyA2lock,A0.idA3A2lock,A0.notelock,A0.classnamekeymasterReference,A0.idA3masterReference,A0.oneOffVersionIdA2oneOffVersi,A0.classnamekeyA2ownership,A0.idA3A2ownership,A0.securityLabels,A0.atGatestate,A0.classnamekeyA2state,A0.idA3A2state,A0.statestate,A0.teamIdIsNull,A0.classnamekeyteamId,A0.idA3teamId,A0.teamTemplateIdIsNull,A0.classnamekeyteamTemplateId,A0.idA3teamTemplateId,A0.enabledtemplate,A0.templatedtemplate,TO_CHAR(A0.createStampA2,'dd mm yyyy hh24:mi:ss'),A0.markForDeleteA2,TO_CHAR(A0.modifyStampA2,'dd mm yyyy hh24:mi:ss'),A0.idA2A2,A0.updateCountA2,TO_CHAR(A0.updateStampA2,'dd mm yyyy hh24:mi:ss'),A0.title,A0.branchIdA2typeDefinitionRefe,A0.idA2typeDefinitionReference,A0.versionIdA2versionInfo,A0.versionLevelA2versionInfo,A0.versionSortIdA2versionInfo,A0B.classnamekeycontainerReferen,A0B.idA3containerReference,A0B.docType,A0B.name,A0B.WTDocumentNumber,A0B.classnamekeyorganizationRefe,A0B.idA3organizationReference,A0B.series,TO_CHAR(A0B.createStampA2,'dd mm yyyy hh24:mi:ss'),A0B.markForDeleteA2,TO_CHAR(A0B.modifyStampA2,'dd mm yyyy hh24:mi:ss'),A0B.classnameA2A2,A0B.idA2A2,A0B.updateCountA2,TO_CHAR(A0B.updateStampA2,'dd mm yyyy hh24:mi:ss'),'wt.representation.OutOfDateRepresentationLink',A1.classnamekeyroleAObjectRef,A1.idA3A5,A1.classnamekeyroleBObjectRef,A1.idA3B5,TO_CHAR(A1.createStampA2,'dd mm yyyy hh24:mi:ss'),A1.markForDeleteA2,TO_CHAR(A1.modifyStampA2,'dd mm yyyy hh24:mi:ss'),A1.idA2A2,A1.updateCountA2,TO_CHAR(A1.updateStampA2,'dd mm yyyy hh24:mi:ss') FROM WTDocument A0,WTDocumentMaster A0B,OutOfDateRepresentationLink A1 WHERE (A0.idA3masterReference=A0B.idA2A2) AND ((A0.markForDeleteA2 = 0) AND (A1.markForDeleteA2 = 0)) AND ((A1.idA3A5 = A0.idA2A2) AND (A1.idA3B5 IN (SELECT /*+ CARDINALITY(wtot 3300) */ * FROM TABLE(cast(? as WCADMIN.TABLE_OF_NUMBER)) wtot WHERE (ROWNUM > 0) AND (column_value IS NOT NULL))))
/*+ CARDINALITY(wtot 3300)/ CARDINALITY causes SQL queries to be very slow, Windchill official bug
Do you have some background behind this? Is there an SPR number or CS article on this? This article, https://www.ptc.com/en/support/article/CS130564?source=search, is not the exact query but points to having to create an index.