Solved

MYSQL insert processes loosing CPU time

Posted on 2014-12-29
3
173 Views
Last Modified: 2014-12-29
Hi i have a large insert process that starts off rapid taking 15% of the cpu time,  but after about 4 hours it then goes down to 1.5% processor time,  is there a setting / failsafe in MYSQL that will mean a mysql process will use less processor if it has been running for x time ?

Thanks ?
0
Comment
Question by:ncomper
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40522560
In answer to the question no.
What is this a cron job or something, what kind of insert?
0
 
LVL 5

Author Comment

by:ncomper
ID: 40522566
A PHP import of a csv file to a MYSQL db
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40522576
You might be better off doing a LOAD DATA which will be a lot of faster than manual inserts

Using PHP will always be slower, and could possibly be you are running low on memory.
How is the php coded for the inserts?
If you are looping and passing the insert statement each time then it will be slow, look at prepared statements.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword This article was written many years ago, in the days when PHP supported the MySQL extension (http://php.net/manual/en/function.mysql-connect.php).  Today (http://php.net/manual/en/migration70.removed-exts-sapis.php) you would not use MySQL…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question