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
3168
November 30, 2011 01:53PM
1536
November 30, 2011 03:15PM
1848
December 01, 2011 09:57PM
1444
December 02, 2011 08:51AM
1579
December 03, 2011 10:26AM
Re: Partitioning Table - GPS Data
1507
December 05, 2011 05:43AM
1777
December 06, 2011 08:46PM
1436
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.