Re: [PHP] Mysql Insert/Update Problem

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-07-2004
Rolf Brusletto
 
Posts: n/a
Default Re: [PHP] Mysql Insert/Update Problem

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:10 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0