MySQL Forums
Forum List  »  Partitioning

Re: Partitioning Table - GPS Data
Posted by: Daniel Alves
Date: December 05, 2011 05:43AM

Even if i add month in that select i cant get a fast result? On the new table my PK is - (`ID`,`VEI_ID`,`COORDINATE_DATE `,`DDL_CTM`,`MONTH`),

Like

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

If i do a explain select partitions i got just one partition on the result.



Edited 1 time(s). Last edit at 12/05/2011 05:45AM by Daniel Alves.

Options: ReplyQuote


Subject
Views
Written By
Posted
3161
November 30, 2011 01:53PM
1531
November 30, 2011 03:15PM
1841
December 01, 2011 09:57PM
1438
December 02, 2011 08:51AM
1576
December 03, 2011 10:26AM
Re: Partitioning Table - GPS Data
1499
December 05, 2011 05:43AM
1766
December 06, 2011 08:46PM
1427
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.