Hello, I’m having some bad performances with an `o...
# troubleshooting
e
Hello, I’m having some bad performances with an
order
statement: • When I’m doing this query:
Copy code
select * from datasource_607ec7451360000300516e33 where REGEXP_LIKE(url, '^.*tv.*$') limit 10
only 240 docs are scanned and I get a reply in 20ms • When I’m adding an order:
Copy code
select * from datasource_607ec7451360000300516e33 where REGEXP_LIKE(url, '^.*tv.*$') order by "timestamp" desc limit 10
547 212 docs are scanned and I get a reply in >1.5s Do you have any ideas/tips to improve this?
c
I'm new to pinot so take this with a grain of salt. What it is happening here is: • in query 1 pinot goes over rows, tries to match the regex and stops when it finds the first 10 to match • in query 2 pinot has to find all rows that match the regex, then order them, and finally it can take the first 10 (or calls nthelemnt for 1..10 instead of sorting) Please correct me if im wrong, I'm curious about how this works internally.
e
For you there is no way to improve this? Since in segments data is already sort by time?