Re: Partition on day of year
Posted by:
Rick James
Date: March 01, 2011 10:33PM
Is this your only kind of query?
select * from test_jobs2 where job_date_time > '2011-01-01' and job_date_time < '2011-01-01 23:59:59'
(A side note: It excludes midnight from either end of the day.)
If there are other types of queries, then optimizing for this one may de-optimize others.
PARTITION is not needed to optimize that query, a non-PARTITION table with an index on job_date_time will run at about the same speed as anything that PARTITION can deliver.
For non-PARTITION:
PRIMARY KEY (`id`)
INDEX(`job_date_time`),
KEY `search` (`customer_id`,`job_date_time`,`printer_name`,`username`)
Does that query return 600K rows? Shoveling that many rows from the server to the client takes time. No INDEX or PARTITIONing can eliminate the transfer time.
Subject
Views
Written By
Posted
8570
February 28, 2011 07:18PM
2910
February 28, 2011 08:43PM
4116
March 01, 2011 12:53AM
Re: Partition on day of year
2589
March 01, 2011 10:33PM
2466
March 02, 2011 10:00AM
2076
March 02, 2011 11:16AM
2255
March 03, 2011 09:47PM
2685
March 04, 2011 08:58AM
2116
March 04, 2011 10:45AM
2657
March 04, 2011 08:23PM
1845
March 02, 2011 02:58AM
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.