MySQL Forums
Forum List  »  Partitioning

Not Taking Paritioning when using Subquery or Join
Posted by: Marc Vettorel
Date: August 27, 2014 07:08AM

Hi there,

i have a little issue with a paritioned table and a SQL query.

Simplified the query looks like this:

Query not taking partition:
select *
from art_prices
where import_id in (select import_id from imports where import_id = 1998)

Column import_id in table art_prices is partitioned by range key.
This query tooks >17sec. Subquery takes way less than 1sec.

Query taking partition:
select *
from art_prices
where import_id in (1998)

this query's very fast (<1sec).

It seems that the mysql optimizer can't use table partitions when not use hard literals for the range key in the query.

Has somebody else got same issues or even a solution for this?

Help is really appreciated.

Regards
Marc

Options: ReplyQuote


Subject
Views
Written By
Posted
Not Taking Paritioning when using Subquery or Join
2911
August 27, 2014 07:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.