Hi,

> I am trying to JOIN 2 tables TBL1 and TBL2 on TBL1.fld_id
> = TBL2.fld_id . And finally I filter out the results that
> i need in the where clause using
>
> where TBL1.fld_col = 100;
>
> Running an EXPLAIN shows that it is an impossible where
> condition. This may be because there may be no rows with 
> fld_col = 100. But in future there could be rows with this
> value in fld_col. So how should I rate this query?
> Should I consider this query as a bad one just because it
> has an impossible where currently?

No,  it's  not a bad query - at the moment it's very fast as
it returns no data :) As for the future, try running EXPLAIN
with  an existing value instead of `100`. In this particular
case, you will probably want an index on `fld_col` for it to
run smoothly.


Best regards,
Aleksandar


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to