Does anyone use the "CONNECT BY PRIOR" statement f...
# suiteql
e
Does anyone use the "CONNECT BY PRIOR" statement for hierarchical queries in SuiteQL? We had a script that was using it to get related records using the NextTransactionLineLink table. It was very performant for a long time - enough to use in a BeforeLoad UserEvent script. But, at some point several months back, the performance nose dived and we had to disable it. Curious if anyone out there has run into this.
w
We use it for a few cases. But it is mostly in the classification table that is hierarchical. Haven't seen any recent slowdowns.
p
@eblackey What does your CONNECT BY PRIOR query look like?
e
Hey all, this turned out to be due to the BUILTIN.DF() functions we were using on the returned columns. Something that was changed in the backend DB (an index perhaps?) must have caused these functions to start being run over a large number of rows. We modified our query to use a subquery so that the BUILTIN.DF functions were only run on the final returned rows, which is usually less than 10.