4 ms·
Any reason to keep the general public from running arbitrary database queries? Yes, I think there is. For example, regular expressions are turing-complete so
by klyrs 5y ago
Any reason to keep the general public from running arbitrary database queries? Yes, I think there is. For example, regular expressions are turing-complete so you can make a query arbitrarily slow without a single join.
edit: complexity lol
- capableweb 5y agoYou could also just limit a query to max N seconds, and abort it if so. I don't think "marketplace of algorithms" necessarily mean people need to be able to make arbitrary database queries either, but seems besides the point. Having their own DSL for sorting timelines can also solve that problem nicely and within whatever performance requirements they would end up with.
- systemvoltage 5y ago> are NP-complete You mean Turing-complete?
- klyrs 5y agoI meant what I said, but I was wrong, thanks.
- fooker 5y agoThat seems like a very unlikely scenario which can be handled with a timeout.