Solved

MYSQL insert processes loosing CPU time

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Loading csv or delimited data files to MySQL database is a very common task frequently questioned about and almost every time LOAD DATA INFILE comes to the rescue. Here we will try to understand some of the very common scenarios for loading data …
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now