Re: Performance question for table updating

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




    Eventually, I wind up with a query similar to:

        UPDATE table_01 SET field_a = 'New value here', updated=CURDATE() WHERE primary_key=12345

Even though you've solved it one way to work out the problem here would be to change it to a select query (unfortunately mysql can't explain insert/update/delete statements - which would make it a lot easier).

ie change it to

select 1 from table where primary_key=12345;

If that's slow, then you're missing an index on primary_key.

If that's fast.. err, you're back to square one :/ or maybe you have too many indexes (which means the update process is spending all of it's time updating the fields & indexes).

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux