Skip to content
Discussion options

You must be logged in to vote

You can use PRAGMA ### explain_query

But just looking at your query I can see it's just a SCAN over bis.Element generally the largest table. What do you want to accomplish with the query? I see you want source aspect for geom3d but I am not sure why you have bis.Element. Do you intent to read all element of all type but grab additional data for geometric elements?

SELECT g.ECInstanceId, g.BBoxLow, g.BBoxHigh, g.Parent.Id, g.FederationGuid, a.Identifier
FROM bis.GeometricElement3d g 
JOIN bis.ExternalSourceAspect a ON a.Element.Id = e.ECInstanceId

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@GhisBntly
Comment options

GhisBntly Mar 5, 2026
Collaborator Author

@khanaffan
Comment options

@GhisBntly
Comment options

GhisBntly Mar 5, 2026
Collaborator Author

@MichaelSwigerAtBentley
Comment options

@DanRod1999
Comment options

Answer selected by GhisBntly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
ecdb ECDb and ECSQL related issues
5 participants