|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
has anyone tried to execute OPTIMIZE TABLE query?? it doesnt seem to work on either WIN or UNIX platform.
it always says: parse error near 'optimize table tablename' at line 1 how do you make it work?? Thanx; ------------------ Alex D. G. http://www.alexdg.com |
|
#2
|
|||
|
|||
|
How do you call the command -
from a PHP-Script or from the command line? At the command line it must work with the command "optimize table tablename;" if you have the privileges to do this! The following information I have copied from the Manual of MySql: >OPTIMIZE TABLE tbl_name > >OPTIMZE TABLE should be used if >you have deleted a large part of >a table or if you have made many >changes to a table with >variable-length rows >(tables that have VARCHAR, BLOB >or TEXT columns). Deleted >records are maintained in a >linked list and subsequent >INSERT operations reuse old >record positions. You can use >OPTIMIZE TABLE to reclaim the >unused space. > >OPTIMIZE TABLE works by making a >temporary copy of the original >table; The old table is copied >to the new table (without the >unused rows), >then the original table is >deleted and the new one is >renamed. While OPTIMIZE TABLE is >executing, the original table is >readable by other clients. >Updates and writes to the table >are stalled until the new table >is ready. This is done in such a >way that all updates are >automatically redirected to >the new table without any failed >updates. |
|
#3
|
|||
|
|||
|
i already found what was the problem... this query was implemented in 3.22.x version and I had 3.21.x... dumbasses.... they should have specified in the manual that this is a feature of a new version... and why the hell was it in the manual which came with my 3.21.x??
anyway, it work now.... ------------------ Alex D. G. http://www.alexdg.com |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > OPTIMIZE TABLE ...; |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|