RE: Slow query involving ORDER BY

2007-08-15 Thread Bob Pisani
your index and table. And you should reduce the other varchar columns to the smallest amount possible. -Original Message- From: Mark Ponthier [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 14, 2007 10:52 AM To: mysql@lists.mysql.com Subject: RE: Slow query involving ORDER BY Sorry

Re: Slow query involving ORDER BY

2007-08-15 Thread Baron Schwartz
Bob Pisani wrote: On another note, you should really change all of those ip address columns from varchar to int with the ip encoded as 4 bytes. You will save A LOT of space in both your index and table. And you should reduce the other varchar columns to the smallest amount possible. Right,

RE: Slow query involving ORDER BY

2007-08-14 Thread Mark Ponthier
PRIMARY,hosts_1,hosts_2 {null} {null} {null} 96Using where Thanks, Mark Ponthier From: Ananda Kumar [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 14, 2007 12:46 AM To: Mark Ponthier Cc: mysql@lists.mysql.com Subject: Re: Slow query

RE: Slow query involving ORDER BY

2007-08-14 Thread Mark Ponthier
] Sent: Tuesday, August 14, 2007 9:47 AM To: mysql@lists.mysql.com Subject: RE: Slow query involving ORDER BY I've added both indexes but don't see an improvement in speed. Below are the the descriptions of each table and the explain plan: CREATE TABLE `hosts` ( `hostid` bigint(20) unsigned

Re: Slow query involving ORDER BY

2007-08-13 Thread Ananda Kumar
It looks like u dont have index on fsys.src_ip and host.ip, please create index on these two columns, and also do a explain of ur query, u will know , where the problem is. regards anandkl On 8/13/07, Mark Ponthier [EMAIL PROTECTED] wrote: Fellow MySQLers, I have a query that performs