How to Make Rough Estimates of SQL Queries
Too Long; Didn't Read
Each database runs a query through the standard process (with some deviations depending on dB implementation): Syntax parsing Semantic parsing Planning Executing. The most time-consuming part is usually executed only because the database must go to disk, get some data and send it to the client. Other parts of the process go mostly to the CPU and use some cached metadata.