Query Performance with [side].[sync_row_is_tombstone] = 1 - Can we use UNION instead? #1297
Unanswered
florianendrich
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
i'm currently writting a
AddCustomWhere
which itselfs joins a lot of tables to do the filtering likeWHERE Id IN (<SubQuery>)
.Now on
AddCustomWhere
- and inAddWhere
the Code is using (or is suggesting to use){{{side}}}.{{{sync_row_is_tombstone}}} = 1
to retreive all deleted rows for sync.However this causes my query to run forever instead of returning in like 4 seconds. There is only 1 deleted row currently.
Now i was wondering if we could simply always add something like this:
at the end of the
WHERE
clauses.Which should actually result in the same result - simply including all deleted rows?
Im also wondering why this is actually done in the
initialize
SP but missing in thechanges
SP?Beta Was this translation helpful? Give feedback.
All reactions