MySQL Forums
Forum List  »  Performance

Re: Low priority SELECT
Posted by: Rick James
Date: May 24, 2014 03:05PM

> in "batches" limiting the number of record with LIMIT r1,r2

Won't help. Instead, keep track of where you "left off" and do
WHERE id > $left_off ORDER BY id LIMIT 1000

Using InnoDB instead of MyISAM lets you have non-locking access.

Yes, doing the "reports" on a slave is a good idea.

The best is to build and maintain "summary tables". See
http://mysql.rjweb.org/doc.php/datawarehouse
http://mysql.rjweb.org/doc.php/summarytables

With summary tables, I can almost always arrange for "reports" to be built in "real time", that is, while the user is waiting for a web page to load.

> low priority

No viable (in my opinion).

> limit the cpu time

That is best done by not needing the CPU -- as is available with Summary Tables.

> limit the cpu time

Massive queries probably involve I/O more than CPU.

Options: ReplyQuote


Subject
Views
Written By
Posted
3312
May 21, 2014 07:18AM
Re: Low priority SELECT
1458
May 24, 2014 03:05PM


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.