RE: Impossible WHERE in explain

2008-09-01 Thread Martin Gainty

The key_len column indicates the length of the key that MySQL decided to use. 
The length is NULL if the key column says NULL. Note that the value of key_len 
allows you to determine how many parts of a multiple-part key MySQL will 
actually use.
i do not know the definition of parameter 'ken_len'Martin 
__ Disclaimer and confidentiality 
note Everything in this e-mail and any attachments relates to the official 
business of Sender. This transmission is of a confidential nature and Sender 
does not endorse distribution to any party other than intended recipient. 
Sender does not necessarily endorse content contained within this transmission. 
> Date: Tue, 2 Sep 2008 02:05:00 +0530> From: [EMAIL PROTECTED]> To: [EMAIL 
PROTECTED]> Subject: Re: Impossible WHERE in explain> CC: 
mysql@lists.mysql.com> > I have already tried. It's not working.> > On Tue, Sep 
2, 2008 at 1:55 AM, Brent Baisley <[EMAIL PROTECTED]> wrote:> > > It might be 
because you you are comparing user_id to a string, when the> > field type is a 
decimal. Drop the quotes around the user_id search value and> > see if that 
works.> >> > Brent Baisley> >> >> > On Sep 1, 2008, at 3:59 PM, Krishna Chandra 
Prajapati 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> >>> >> >> 
> > -- > Krishna Chandra Prajapati
_
Be the filmmaker you always wanted to be—learn how to burn a DVD with Windows®.
http://clk.atdmt.com/MRT/go/108588797/direct/01/

Re: Impossible WHERE in explain

2008-09-01 Thread Jim Lyons
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 <
[EMAIL PROTECTED]> 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


Re: Impossible WHERE in explain

2008-09-01 Thread Krishna Chandra Prajapati
I have already tried. It's not working.

On Tue, Sep 2, 2008 at 1:55 AM, Brent Baisley <[EMAIL PROTECTED]> wrote:

> It might be because you you are comparing user_id to a string, when the
> field type is a decimal. Drop the quotes around the user_id search value and
> see if that works.
>
> Brent Baisley
>
>
> On Sep 1, 2008, at 3:59 PM, Krishna Chandra Prajapati 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
>>
>
>


-- 
Krishna Chandra Prajapati


Re: Impossible WHERE in explain

2008-09-01 Thread Brent Baisley
It might be because you you are comparing user_id to a string, when  
the field type is a decimal. Drop the quotes around the user_id search  
value and see if that works.


Brent Baisley

On Sep 1, 2008, at 3:59 PM, Krishna Chandra Prajapati 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



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



Impossible WHERE in explain

2008-09-01 Thread Krishna Chandra Prajapati
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


Re: sync

2008-09-01 Thread Mad Unix
yes, they should be identical , am thinking to use the howtoforge
mysql_database_replication document.

On Mon, Sep 1, 2008 at 4:58 PM, Ranjeet Walunj <[EMAIL PROTECTED]>wrote:

> Mad Unix wrote:
>
>> I was wandering if anyone know a good way to sync 2mysql databases
>> _one_way
>> The mysql is alocated on a web php application
>>
> Do they (DB) need to be identical ?  Have you checked replication ?
>
> Regards,
> Ranjeet Walunj
>
>
>


-- 
Madunix_at_Gmail
Sysadmin

"Computers are useless. They can only give you answers" - Pablo Picasso
"Never trust a computer you can't throw out a window." - Steve Wozniak


RE: sync

2008-09-01 Thread Martin Gainty

can you provide a testcase would justify 2 different DB schemas?If you're 
willing to stay with identical configurations take a look at
http://dev.mysql.com/doc/refman/5.0/en/replication.htmlHTHMartin 
__ Disclaimer and confidentiality 
note Everything in this e-mail and any attachments relates to the official 
business of Sender. This transmission is of a confidential nature and Sender 
does not endorse distribution to any party other than intended recipient. 
Sender does not necessarily endorse content contained within this transmission. 
> Date: Mon, 1 Sep 2008 17:58:10 +0530> From: [EMAIL PROTECTED]> To: [EMAIL 
PROTECTED]> CC: mysql@lists.mysql.com> Subject: Re: sync> > Mad Unix wrote:> > 
I was wandering if anyone know a good way to sync 2mysql databases _one_way> > 
The mysql is alocated on a web php application> Do they (DB) need to be 
identical ? Have you checked replication ?> > Regards,> Ranjeet Walunj> > > > 
-- > MySQL General Mailing List> For list archives: 
http://lists.mysql.com/mysql> To unsubscribe: http://lists.mysql.com/[EMAIL 
PROTECTED]> 
_
Get thousands of games on your PC, your mobile phone, and the web with Windows®.
http://clk.atdmt.com/MRT/go/108588800/direct/01/

Re: sync

2008-09-01 Thread Ranjeet Walunj

Mad Unix wrote:

I was wandering if anyone know a good way to sync 2mysql databases _one_way
The mysql is alocated on a web php application

Do they (DB) need to be identical ?  Have you checked replication ?

Regards,
Ranjeet Walunj



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



Re: sync

2008-09-01 Thread ewen fortune
Hi,

Have you tried mk-table-sync from the Maatkit toolset

http://www.maatkit.org/tools.html


Ewen

On Mon, Sep 1, 2008 at 2:12 PM, Mad Unix <[EMAIL PROTECTED]> wrote:
> I was wandering if anyone know a good way to sync 2mysql databases _one_way
> The mysql is alocated on a web php application.
>
> Thanks
>
>
> --
> Madunix_at_Gmail
> Sysadmin
>
> "Computers are useless. They can only give you answers" - Pablo Picasso
> "Never trust a computer you can't throw out a window." - Steve Wozniak
>

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



sync

2008-09-01 Thread Mad Unix
I was wandering if anyone know a good way to sync 2mysql databases _one_way
The mysql is alocated on a web php application.

Thanks


-- 
Madunix_at_Gmail
Sysadmin

"Computers are useless. They can only give you answers" - Pablo Picasso
"Never trust a computer you can't throw out a window." - Steve Wozniak