Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 2.2 KB

Analogies.md

File metadata and controls

39 lines (23 loc) · 2.2 KB

Analogies

Db is a car. Query is a road. Mem cache is storage.

Db tuning is like tuning a car to run better on any road. Query optimization is like choosing better roads to drive. Storing in a cache is like putting things your a going after in the start of the road, so no need to drive the road.

https://geomarketing.com/wp-content/uploads/2015/09/car-on-map.jpg

"Why it's taking so long?"

It's like asking Are we there yet? - you can ask, but the distance won't change

https://i.pinimg.com/originals/11/fd/51/11fd51124a5fbce5b44a70314f11b9a1.png

Working in an unadjusted environment

Is just like driving in a car when the steer is on the opposite side and the seat is way too far.

https://i2.wp.com/theverybesttop10.com/wp-content/uploads/2014/12/Top-10-Ways-to-Recycle-Plastic-Garden-Chairs-10.jpg?resize=600%2C376&ssl=1

Steps of solving an issue

Is just like fixing a car - you need to get to know the car first - gears, acceleration, lights, steer and so on.

https://www.newkidscar.com/wp-content/uploads/2019/04/cars-1.jpg

https://s3-eu-west-1.amazonaws.com/tdi-website/images/BlogEntry/3/456/mazda-2-skyactiv-tuning.jpg

Indexes

  • Try to find a person called John Doe The 2nd in 100 page paperback document.
  • Imagine there would also be pages that tells in which pages you can find animals, fruits and persons. It might be faster to look in the person list, than looking into the animal list or just going over the whole document. That means making the right index for the right need.

Solution tradeoffs

I work a lot in cryptography; the most secure system would be unworkable for users and a system easiest for users would be too vulnerable. Tradeoffs.