MySQL Forums
Forum List  »  Partitioning

Re: Partitioning Table - GPS Data
Posted by: Rick James
Date: December 06, 2011 08:46PM

> If i do a explain select partitions i got just one partition on the result.
That does _not_ mean that it is any faster than if you did not have partitioning.

SELECT  (ddl_ct2 + 128)
    FROM  gps_data
    WHERE  COORDINATE_DATE between SUBDATE(#currentCoordinateDate#, 2)
                                      AND  #currentCoordinateDate#
      AND  `MONTH`= MONTH(#currentCoordinateDate#)
      AND  (ddl_ten + 128) * 0.5 > 8
      AND  vei_id = #vehicleID#
    ORDER BY  ddl_dh DESC
    LIMIT  5
will probably use the first two fields of
KEY `IDX_DDL_PTP_IDR` (`VEI_ID`,`COORDINATE_DATE `,`PTP_IDR`),
Is that what the EXPLAIN says?

Yes, adding MONTH to the WHERE clause made the query about 12 times as fast. But now it is about as fast as if the table were not partitioned.

Options: ReplyQuote


Subject
Views
Written By
Posted
3024
November 30, 2011 01:53PM
1447
November 30, 2011 03:15PM
1751
December 01, 2011 09:57PM
1355
December 02, 2011 08:51AM
1488
December 03, 2011 10:26AM
1407
December 05, 2011 05:43AM
Re: Partitioning Table - GPS Data
1643
December 06, 2011 08:46PM
1331
December 02, 2011 08:52AM


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.