It depends on the distribution of the 4 'values' in that field.
If the cardinality is poor, then INDEX(VAL) won't be used, and they will all do
a table scan.
> -Original Message-
> From: Anupam Karmarkar [mailto:sb_akarmar...@yahoo.com]
> Sent: Friday, November 16, 2012 12:36 AM
> To: mys
Am 16.11.2012 19:21, schrieb Érico:
> I have followed the steps from bellow to install mysql from src on my linux
> ( red hat 6 ) :
>
> shell> groupadd mysql
> shell> useradd -r -g mysql mysql
> # Beginning of source-build specific instructions
> shell> tar zxvf mysql-VERSION.tar.gz
> shell> cd
I have followed the steps from bellow to install mysql from src on my linux
( red hat 6 ) :
shell> groupadd mysql
shell> useradd -r -g mysql mysql
# Beginning of source-build specific instructions
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> cmake .
shell> make
shell> make i
SELECT * FROM XYX WHERE VAL IN ('BLUE','RED','GREEN'); query will make it
faster, if the field is ENUM
On Fri, Nov 16, 2012 at 12:36 AM, Anupam Karmarkar
wrote:
> Hi All,
>
> Consider a scenario, I have table XYZ which contains value follow
> BLUE
> RED
> GREEN
> NULL
>
> following are queries w