|
|
|
|
|
by silon
5515 days ago
|
|
I wish there was an SQL option to cause a fatal error if it needs to do a table scan. This would be very useful on test systems, at least. NoSQL forces discipline which is a good thing, preventing "late" performance optimization when in production. |
|
If you have a table with four rows in it, would you like the database to give you errors when you do a full scan on it?
What you want is an option to throw errors when a query takes too long to execute and most products already have this in the form of a statement timeout parameter.
On a separate note, the balance between "late" optimization and "premature" optimization is thin indeed... These test systems need to run with the same data and on the same hardware as your main database to give meaningful results, so it's generally unavoidable to do some kind of performance tweaking on the already deployed code. And of course as the data distribution and its amount changes, you need to keep on optimizing...