Simple SQL tips

Nothing ground breaking, but hey, simplicity and basics are the most important. Reader Rules Don’t run select * queries without filters You might not know how big the table you are querying is. Therefore, in order not to negatively impact the performance of the whole system, limit the amount of the query. Instead of 1 select * from myTable; use 1 select * from myTable limit 10; Writer Rules Use transactions Even simple & tested queries might have unintentional side-effects. ...

April 20, 2024 · 2 min · 231 words