Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

RE: query performance slow

From: Bob Pisani <bpisani(at)schonfeld.com>
Date: Wed Jul 25 2007 - 12:02:21 EDT


I had looked into that and it seems that it's on by default in 5.1:  

-----Original Message-----
From: Anatoly Pidruchny [mailto:apidruchny@newxt.com] Sent: Wednesday, July 25, 2007 12:00 PM
To: Bob Pisani
Cc: 'cluster@lists.mysql.com'
Subject: Re: query performance slow

Bob,

did you try to use engine_condition_pushdown option?

http://dev.mysql.com/doc/refman/5.1/en/explain.html

Regards,

Anatoly.
> Hey all,
>
> I'm doing some testing of cluster, 5.1.20, on SuSE 10.2. 1 mysql node,
> 2 data nodes. I have a disk based table, orders, with a primary key on
> order time and order id. I loaded 1M+ rows into the table and queried as
follows:
>
> select * from orders where order_id = 'h0r50000145096' and order_time
> = '20070718093222'; ....
> 1 row in set (0.01 sec)
>
> select * from orders where order_id = 'h0r50000145096' and order_time
> > '20070718090000' and order_time < '20070718100000'; ....
> 1 row in set (1 min 27.38 sec)
>
> Running an explain on the second query shows:
> +----+-------------+-------------+-------+---------------+---------+--
> +----+-------------+-------------+-------+---------------+---------+--
> +----+-------------+-------------+-------+---------------+---------+--
> +----+-------------+-------------+-------+---------------+---------+--
> -+------+------+-----------------------------------+
> | id | select_type | table | type | possible_keys | key |
key_len
> | ref | rows | Extra |
> +----+-------------+-------------+-------+---------------+---------+--
> +----+-------------+-------------+-------+---------------+---------+--
> +----+-------------+-------------+-------+---------------+---------+--
> +----+-------------+-------------+-------+---------------+---------+--
> -+------+------+-----------------------------------+
> | 1 | SIMPLE | orders | range | PRIMARY | PRIMARY | 24
> | NULL | 1 | Using where with pushed condition |
> +----+-------------+-------------+-------+---------------+---------+--
> +----+-------------+-------------+-------+---------------+---------+--
> +----+-------------+-------------+-------+---------------+---------+--
> +----+-------------+-------------+-------+---------------+---------+--
> -+------+------+-----------------------------------+

>

> I know the first query is using the primary key, and it would seem
> that the second query is supposed to use the ordered index created
> with the primary hash key. Ndb_desc shows:
> ....
> -- Indexes --
> PRIMARY KEY(ORDER_ID, ORDER_TIME) - UniqueHashIndex
> PRIMARY(ORDER_TIME, ORDER_ID) - OrderedIndex
>

> The question is am I missing something? When I've loaded a few more
> million rows in, the second query practically never finishes. I would
> expect that a range query would hit the ordered index and be somewhat
performant.
> Thoughts?
>

> Thanks,
> Bob Pisani
>
>
>

> This communication is for informational purposes only. It is not
> intended as an offer or solicitation or as an official confirmation.
> Market prices and other information are not guaranteed as to
> completeness or accuracy and are subject to change without notice.
> Schonfeld Group reserves the right to monitor and review the content
> of all messages sent to or from this e-mail address.
>
>

This communication is for informational purposes only. It is not intended as an offer or solicitation or as an official confirmation. Market prices and other information are not guaranteed as to completeness or accuracy and are subject to change without notice. Schonfeld Group reserves the right to monitor and review the content of all messages sent to or from this e-mail address.

-- 
MySQL Cluster Mailing List
For list archives: 
http://lists.mysql.com/cluster
To unsubscribe:    
http://lists.mysql.com/cluster?unsub=lists@pantek.com
Received on Wed Jul 25 12:04:05 2007
Do you need help?X

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:30:33 EDT


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