Question : I have this query: SELECT * FROM table1 WHERE foo IN (1,2,3,4) AND bar = 123; I have […]
Category: Database Index
Find least recently used mysql table index
Question : I am cleaning up duplicate indices from (innodb)tables in a mysql database. The database has about 50 tables. […]
With a multi column non clustered index, and the SELECT on middle column, why does SQL server query this index rather than scanning the table?
Question : A single non clustered is set up on LastName, FirstName, MiddleName – in that order. SELECT * FROM […]
MySQL not using indexes
Question : My query does not seem to bother for using indexes. Collations are the same on each table. EXPLAIN […]
Index fragementation ? is it unavoidable
Question : This is follow up question to @martin smith excellent answer https://stackoverflow.com/questions/1251636/what-do-clustered-and-non-clustered-index-actually-mean After that i have watched MCM video […]
Indexes and Optimizations for Logging System
Question : I’m designing tables for a new log system and am having trouble figuring out what indexes I’ll need […]
SELECT Causes Performance Issue [closed]
Question : Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? […]
SQl code performance
Question : What measurement do you know if this sql code is efficient based on execution plans? How do you […]
When to use sort_in_tempdb when rebuilding indexes?
Question : We are debating whether to use the SORT_IN_TEMPDB option for our DW tables. My understanding is that there […]
How to optimize SQL with WHERE and ORDER BY
Question : I have the SQL statement: SELECT erp_orders_id FROM erp_orders o WHERE o.orders_export_time >= ‘2015-09-20’ ORDER BY o.erp_orders_id ASC […]