List:General Discussion« Previous MessageNext Message »
From:Jim Lyons Date:September 1 2008 9:55pm
Subject:Re: Impossible WHERE in explain
View as plain text  
I just tried this.  I got the same results *until* I inserted a record that
met the criteria.  SInce the values are for a primary key, EXPLAIN could see
there was no such entry and so reported that.  If you actually execute the
command, you would not see an error, just no rows returned.  EXPLAIN was
showing you that, since it can tell there are no records to retrieve, it
won't try.

I assume you did not actually have that data in the table.  Is that right?

On Mon, Sep 1, 2008 at 2:59 PM, Krishna Chandra Prajapati <
prajapatikc@stripped> wrote:

> Hi,
>
> In the query below explain gives 'Impossible WHERE noticed after'. what
> does
> this mean.
>
> CREATE TABLE `user_cookie` (
>  `user_id` decimal(22,0) NOT NULL default '0',
>  `param` varchar(128) NOT NULL default '',
>  `value` varchar(128) default NULL,
>  PRIMARY KEY  (`user_id`,`param`),
>    CONSTRAINT `fk_user_cookie` FOREIGN KEY (`user_id`) REFERENCES
> `user_info` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1
>
>   SELECT VALUE  FROM user_cookie  WHERE USER_ID = '10538485' AND PARAM =
> 'TIMEOUT'    table |type |possible_keys |key | ken_len|ref | rows|  1
> |SIMPLE | | | | | |Impossible WHERE noticed afte
> --
> Krishna Chandra Prajapati
>



-- 
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com

Thread
Impossible WHERE in explainKrishna Chandra Prajapati1 Sep
  • Re: Impossible WHERE in explainBrent Baisley1 Sep
    • Re: Impossible WHERE in explainKrishna Chandra Prajapati1 Sep
      • RE: Impossible WHERE in explainMartin Gainty2 Sep
        • Re: Impossible WHERE in explainKrishna Chandra Prajapati2 Sep
  • Re: Impossible WHERE in explainJim Lyons1 Sep