[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

MYSQL insert processes loosing CPU time

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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
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…

649 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