Sundaresan Anandansundaresan.hashnode.dev·Sep 29, 2024DB Indexing: In-depth look into database indexing and tutorial for implement.What is an indexing? Indexing is a technique used by SQL databases to exact the data fasters. Means our DB will maintain a sub-table for our records and utilize that table to identify the expected data. Sounds confusing😕 let’s take look into the rea...SQL
The Analyst Geektheanalystgeek.hashnode.dev·Jul 30, 2023Optimized SQL Queries for Daily Use !1. Use ‘regexp_like’ to replace ‘LIKE’ clauses Normal Query - SELECT * FROM table1 WHERE lower(item_name) LIKE '%Table%' OR lower(item_name) LIKE '%Chair%' OR lower(item_name) LIKE '%Bed%' OR lower(item_name) LIKE '%Fan%' --and so on Optimized Query...34 readsSQL Server
Edward Chuedwardchu.hashnode.dev·Jul 9, 2022一次 MySql 分页查询优化原理分析场景: 有一张财务流水表,未分库分表,目前的数据量为955万+,分页查询使用到了limit,优化之前的查询耗时 16 s 912 ms (execution: 16 s 805 ms, fetching: 107 ms),按照下文的方式调整SQL后,耗时 332 ms (execution: 158 ms, fetching: 174 ms); 操作: 查询条件放到子查询中,子查询只查主键ID,然后使用子查询中确定的主键关联查询其他的属性字段; 原理: 减少回表操作,利用延迟关联或者子查询...MySQL