Solved

MYSQL insert processes loosing CPU time

Posted on 2014-12-29
3
175 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

Upcoming Webinar: Securing your MySQL/MariaDB data

Join Percona’s Chief Evangelist, Colin Charles as he presents Securing your MySQL®/MariaDB® data on Tuesday, July 11, 2017 at 7:00 am PDT / 10:00 am EDT (UTC-7).

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

705 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