utaylor
(Utah Taylor)
1
10.2.500.8 (I know it’s old)…
I am running this BAQ in 6-8 seconds via BAQ Designer, but the REST call to it never finishes…
I saw other posts on here talking about performance issues with BAQSvc from rest with even older versions that have since been fixed…
I don’t really get it. Anyone have any clues?
Usually you have a stuck cache. Try using the OPTION(RECOMPILE) or OPTION(OPTIMIZE-FORUNKNOWN) hacks in the forum to get past it.
1 Like
utaylor
(Utah Taylor)
3
And I choose QueryOption as the setting?
If you are in 2023 then yes its in the Options to add otherwise you have to hack it via a group by or calculated field.
utaylor
(Utah Taylor)
5
I’m on 10.2.500.8…
so I would create a calculated field and put that statement in there?
Its hacky, check out the post above I think it has some examples on how to do it. Hold on let me find it.
utaylor
(Utah Taylor)
8
Also, this ONLY affects this one query, right?
utaylor
(Utah Taylor)
10
I don’t have an ORDER BY clause in my SQL query, it’s still fine if I use that in the execution settings?
josecgomez
(Jose C Gomez)
11
Yeah it will add one. it will add ORDER BY 1 (which is no sort at all but that’s fine)
YOU Can also try OPTION(RECOMPILE) instead of OPTIMIZE FOR UNKNOWN.
utaylor
(Utah Taylor)
12
I’ll try both man, thank you. I am trying optimize for unknown right now, but up to 1 minute and 30 seconds already on this rest call so…
utaylor
(Utah Taylor)
13
Had to do the persists in query and I think I had to add another execution setting to get it to save, idk. Thanks a ton Jose.
For the record I did read those posts and try that prior to posting, but I wasn’t doing it right.