Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql force query to use index

/* if mysql is dumb and using wrong index you can force it to use
the one you want like so:*/
select name from users USE INDEX (index4) where name='hello';
Comment

Force Index in MySql

EXPLAIN SELECT 
    productName, buyPrice
FROM
    products 
FORCE INDEX (idx_buyprice)
WHERE
    buyPrice BETWEEN 10 AND 80
ORDER BY buyPrice;
Code language: SQL (Structured Query Language) (sql)
Comment

PREVIOUS NEXT
Code Example
Sql :: alter table column change data type to text mysql 
Sql :: sql list all procedures 
Sql :: get column name sql server 
Sql :: select duplicates in sql 
Sql :: mysql list databases 
Sql :: ci last query 
Sql :: postgresql db owner change 
Sql :: alter table column size oracle 
Sql :: find largest table in mysql database 
Sql :: sql search all columns of database oracle sql 
Sql :: oracle table size 
Sql :: import sql file from laravel 
Sql :: sql script get all stored procedures from database 
Sql :: sql add date hour 
Sql :: mysql change root mysql_native_password 
Sql :: oracle sql drop index 
Sql :: find names starting with vowels in sql 
Sql :: mysql show processlist full query 
Sql :: how to run mysql in git bash 
Sql :: select password from user mysql 
Sql :: sql select table header 
Sql :: netstat -tln mysql 
Sql :: how to import database in mysql by cmd 
Sql :: raw query must include primary key 
Sql :: SELECT User,Host FROM mysql.user; 
Sql :: ifnull postgres 
Sql :: mysql show foreign keys 
Sql :: mysql where in array 
Sql :: mysql change root password ubuntu 
Sql :: grant all privileges mysql 8.0.21 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =