Why this query is fast

The Backend Engineering Show with Hussein Nasser

Episode | Podcast

Date: Wed, 04 May 2022 19:58:31 GMT

<p>Welcome to another database question. In this question I created a community poll question and provided some answers. All answers can be correct of course but the question is what is the most efficient? this is what I try to explore in this video and compare how different database platforms such as mysql or Postgres differ in those implementations;</p> <p>Table T with three integer fields A, B and C.</p> <p>A has a primary key clustered index.</p> <p>B has a secondary index.</p> <p>Which query is more likely to be the most efficient?</p> <p>0:00 Intro</p> <p>1:00 The Question</p> <p>3:20 WHERE C BETWEEN 50,50000</p> <p>5:30 WHERE B BETWEEN 50,50000</p> <p>13:20 WHERE C BETWEEN 50,50000</p> <p>Fundamentals of Networking for Effective Backends udemy course (link redirects to udemy with coupon)</p> <p>https://network.husseinnasser.com</p> <p>Fundamentals of Database Engineering udemy course (link redirects to udemy with coupon)</p> <p>https://database.husseinnasser.com</p>