?
Solved

MYSQL insert processes loosing CPU time

Posted on 2014-12-29
3
Medium Priority
?
182 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 2000 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

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…
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

752 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