Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Cluster performance with data node down

From: Stewart Smith <stewart(at)mysql.com>
Date: Thu Aug 30 2007 - 23:53:51 EDT


On Tue, 2007-08-21 at 11:58 +0200, Giulio Ferro wrote:
> The query is a simple select on a single table. The tables contains
> about 330.000 entries. The queries executed are like this:
> select * from <tablename> where <varchar_field> = '....';

can use index

> select * from <tablename> where <varchar_field> like '%....%';

cannot use index.

> <varchar_field> is a varchar(255) and is also an index.
>
>
>
> explain output:
> +----+-------------+----------------+------+---------------+------+---------+------+--------+-----------------------------------+
> | id | select_type | table | type | possible_keys | key |
> key_len | ref | rows | Extra |
> +----+-------------+----------------+------+---------------+------+---------+------+--------+-----------------------------------+
> | 1 | SIMPLE | <tablename> | ALL | NULL | NULL | NULL
> | NULL | 330122 | Using where with pushed condition |
> +----+-------------+----------------+------+---------------+------+---------+------+--------+-----------------------------------+
> 1 row in set (0.01 sec)

i.e. no index is being used.

Add index to speed up first query.

Not going to happen for 2nd though.

Do you need help?X

You may want to try with condition pushdown disabled, this may be quicker for the second query (or may not). either way, it's a table scan.

-- 
Stewart Smith, Senior Software Engineer
MySQL AB, www.mysql.com
Office: +14082136540 Ext: 6616
VoIP: 6616@sip.us.mysql.com
Mobile: +61 4 3 8844 332

Jumpstart your cluster:
http://www.mysql.com/consulting/packaged/cluster.html
Received on Thu Aug 30 23:54:56 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 10:15:06 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library