#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 1999
    Location
    Canada, Toronto
    Posts
    103
    Rep Power
    15
    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. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    109
    Rep Power
    14
    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.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 1999
    Location
    Canada, Toronto
    Posts
    103
    Rep Power
    15
    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

Similar Threads

  1. Replies: 0
    Last Post: January 30th, 2004, 02:18 PM
  2. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 06:19 PM
  3. DB design - flat files or in a table
    By persaltier in forum Database Management
    Replies: 1
    Last Post: December 12th, 2003, 08:39 PM
  4. Controlling Multiple table Heights in a Browser
    By AttaBoy in forum HTML Programming
    Replies: 1
    Last Post: December 10th, 2003, 04:24 AM
  5. ISAM table locking issues
    By badhaiku.dk in forum MySQL Help
    Replies: 4
    Last Post: December 20th, 2002, 08:04 PM

IMN logo majestic logo threadwatch logo seochat tools logo