Below you will find pages that utilize the taxonomy term “sql”
Posts
Quirks of Query Planner
Query Planning Every SQL database (postgres,mysql) has a query planner built into it whose job is to find the best strategy to come up with the results given the query, its predicates and other expressions. Following examples are from postgres where I explore around how query planner makes its decision based on the data size in the table and the state of the database even in the presence of index.
read morePosts
SQL Injection - 101
SQL Injection Starting off with one of my favorite xkcd comic
SQL Injection is a way where a user is able to send some ‘code’ as part of the input data to the server all the way back to the database. (UI layer doesn’t sanitize/validate, API layer let’s the malicious ‘code’ reach the database because it’s not mindful in how to separate ‘query’ and ‘data’).
Taking the example from xkcd:
read more