I have a server-side code written in Node.js that makes 6 SQL queries in one request. The queries consist of mostly SELECT statements with a couple of INNER JOIN and OUTER JOIN.
They take about 4ms when I run them directly in command-line.
I am curious at what point they would be considered slow and I'll have to maybe start memcaching the results. Coming from front-end world, 4ms seems extremely fast!
What is considered slow with respect to SQL queries?
Anything the user complains about.
And of course that is not always rational but it is the only meaningful anwer. The quesiton is so dependant on context; a OLTP system will have different characteristics from an OLAP one. Also, what might be fast for a single DB lookup may be slow with 6.
If the finished product is slow to use worry about it, otherwise focus on other aspects of quality. Of course is something presents itwelf to enable you to improve performance do so but don't look for problems before they exist.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With