This is a discussion on Re: [PHP] Mysql Insert/Update Problem within the PHP General forums, part of the PHP Programming Forums category; Haseeb - I would look at the indexes that it requires for the select statments, if the db isn't indexed ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Haseeb - I would look at the indexes that it requires for the select
statments, if the db isn't indexed properly, it could be just filesorting on each select(when you query to see if the record is in the database on the mysql server). You can find out by putting explain in front of your select query and running it at command line, or whatever you use as a mysql database front end.. This tutorial shows how to use it a little more in depth : http://www.phpexamples.net/tutorial-2-1.html Hope it helps, Rolf Brusletto www.phpexamples.net www.emailfeeds.com Haseeb Iqbal wrote: >here is what i am trying to achieve,i have 2 servers. Win2k and linux. >mysql is running on my linux server.now i have quite a lot of that i need to update on linux server from win2k machine. >here is what i am trying to do.i have a PHP CLI script that will open a dbx file extract records from the dbf file one by one check is the record is already on the linux server (mysql database). if the record is already on the linux server then it will update the mysql database on the linux server. but if the record is not in the mysq database running on linux then it will insert the record. the script is running on win2k server. > >there are 6 dbf file that i need to extract. >comcat.dbf contains 581 records >comgrp.dbf contains 79 records >comsub.dbf contains 1896 records >manuf.dbf contains 793 records >prodaux.dbf conatins 170000+ records >products.dbf conatins 170000+ records > >the script it taking to much time while inserting. it almost 24 hours now and still it isnt finished.what can i do to update the db faster. > >thanx for any help in advance > >Haseeb Iqbal. > > -- Rolf Brusletto rolf[at]emailfeeds[dot]com http://www.emailfeeds.com |