3 ms·
You can't ship SQL queries and then do arbitrary schema changes either, right?
by tshaddox 5y ago
You can't ship SQL queries and then do arbitrary schema changes either, right?
- lazide 5y agoNot arbitrary changes, but nearly so - if you add new columns (and your existing queries name the columns they use explicitly), then nothing changes as far as the client is concerned. If you remove or rename one, only those clients who refer to it need to change, and then only if you don’t do a interposing view/schema/etc. The server is supposed to take the logical intent specified by the queries and do the work to mapping that into concrete retrievals in a stable and performant way, so a query explicitly telling the server to do something in a specific way breaks the model. The more specific, the more broken. DDL changes for instance ideally would not have to tell the server how to structure things on disk. The server should know how to do it efficiently. That said, real life intrudes and sometimes (but not usually) it’s important to do this for stability or performance reasons. The more magic involved, the more unpredictable a system can be, and the closer a system runs to redline, the more chaos/downtime that can cause.