Query slow when enabling distinct response
Hi,
I have a query in one of my endpoints which queries table A with a Query all Records statement.
In this query I have two left joins to tables B and C. An entry from table A can have multiple entries in B and C.
To get only results from table A I need to enable the "Distinct" response in the output tab.
If I do so, the query takes more than 3 seconds to execute. If I set it to "automatic" the query takes only 0.2 seconds.
I really don't get why this is such a difference, if I try the same with mysql there is (almost) no difference in the execution time.
Update:
The reason I get multiple items in the response from table A is that I use an eval from table B, but the result of that is always true OR false for an entry from table A. (It should only indicate IF the left join to table B found an entry - I did not find a proper solution for that as to use a field from table B via eval)
If I remove the eval from table B the results are not duplicates with auto distinction.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback