What makes a good database engineer

What makes a good database engineer

The art of truly understanding database systems boils down to the following principles.

  • You cannot do much with data on disk until you read it to memory.
  • You cannot do much with data on memory until it is read into the CPU L caches.
  • You cannot do much with data on the CPU cache until it is read into the CPU registers.
  • Reading from disk (SSD) is 2000~ times slower than reading from memory.
  • Reading from memory is 200~ times slower than reading from the CPU cache (L1d)
  • Reading from L caches is 20 times slower than reading from the CPU registers
  • Disk is abundant.
  • Memory is limited.
  • CPU cache is a scarce resource.
  • And CPU registers are extremely limited.
  • When reading a block of bytes from disk to memory, plan to use it fully, over and over again.
  • The block of bytes will be cached in the CPU L cached available to you hot. If you don’t use it something else will take its place.
  • When your block is kicked out, you incur the cost of bringing it back on

With these principles in mind, a good database engineer will appreciate the colossal task of a simple index scan and rewrite your SQL queries, configuration, data modeling and perhaps the storage engine itself to achieve optimum efficiency.

Finally these are only guiding principles and meant to be broken.

For those interested in databases you can grab my fundamentals of database engineering course

https://databases.win

Gowri Srinivas Guthikonda

Master's in GeoInformatics - GIS Consultant | GIS Specialist | FME | Python | SQL | ESRI | ArcFM | Telecom | Utility | Geospatial Data Services | Remote Sensing | Urban & Landscape planning

1 个月

Very informative

回复
Jo?o Lima

Analista de Informática Legislativa at Senado Federal

1 个月

These are excellent tips, but most of the time, performance issues are due to poorly written SQL or a lack of proper indexes in the database. For better diagnostics, learn how to interpret the EXPLAIN output, which reports the access paths being used.

Alexander Potts

Dev turned data engineer. Will write SQL for food.

1 个月

"rewrite... perhaps the storage engine itself". no pressure ??

Shiva Vinodkumar

Frontend Developer | Passionate about JavaScript, React, and Next.js | BCA Student

1 个月

Wow, I’m absolutely?thrilled?to see this! Your insights are truly?inspiring?and reflect a?passionate?commitment to excellence. I love how you approached this challenge with such?creativity?and?drive. It’s exciting to witness the impact of your work, and I can’t wait to see what you accomplish next! Keep pushing the boundaries—your efforts are making a difference!

回复
Ryan P.

Data Engineering | Distributed Infrastructure, Data Products, Making big data, small | Data Nerd | ex-Amazon

1 个月

As the saying goes the most efficient I/O call is the one that is never made.

回复

要查看或添加评论,请登录

Hussein Nasser的更多文章

  • A Story about Lunch and cache invalidation

    A Story about Lunch and cache invalidation

    A construction project at work has been blocking the main doorway to the cafeteria where we get lunch. For the first…

    11 条评论
  • The Six Connections Limit in Chromium Browsers

    The Six Connections Limit in Chromium Browsers

    A web application can be choked by Chrome’s HTTP/1.1 six connection per host limit.

    8 条评论
  • The Beauty of the WAL - A deep dive

    The Beauty of the WAL - A deep dive

    In any database system there are often two major storage units, data and indexes. Data represents tables, collections…

    11 条评论
  • A TCP option that improves Frontends and Backends latency

    A TCP option that improves Frontends and Backends latency

    99% of network latency issues are caused by the user app logic. App logic here includes libraries and frameworks used…

    34 条评论
  • What happens when databases crash?

    What happens when databases crash?

    This can make an interesting interview question. Databases have tables and indexes stored in files and cached in memory…

    18 条评论
  • What happens to a request before it’s processed?

    What happens to a request before it’s processed?

    When sending a request to a backend, we tend to focus on the processing aspect of the request, which is really the last…

    5 条评论
  • How to Become a Good Backend Engineer (Fundamentals)

    How to Become a Good Backend Engineer (Fundamentals)

    I have been a backend engineer for over 20 years and I have witness technologies come and go. One thing however, always…

    49 条评论
  • Postgres and MySQL, the main differences

    Postgres and MySQL, the main differences

    One of my udemy students asked a question about the difference between Postgres and MySQL. The answer turned out too…

    11 条评论
  • Good code, Bad code

    Good code, Bad code

    Code is just code, until bugs appear. Then we label it “bad code”.

    20 条评论
  • Avoid SELECT *, even on a single-column tables

    Avoid SELECT *, even on a single-column tables

    Try avoiding SELECT * even on single-column tables. Just keep that in mind even if you disagree.

    19 条评论

社区洞察

其他会员也浏览了