MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 19th, 2000, 06:03 PM
AlexDG AlexDG is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 1999
Location: Canada, Toronto
Posts: 103 AlexDG User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
Send a message via ICQ to AlexDG
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


Reply With Quote
  #2  
Old May 23rd, 2000, 10:07 AM
pwluky pwluky is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 109 pwluky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.

Reply With Quote
  #3  
Old May 23rd, 2000, 10:41 AM
AlexDG AlexDG is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 1999
Location: Canada, Toronto
Posts: 103 AlexDG User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
Send a message via ICQ to AlexDG
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


Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > OPTIMIZE TABLE ...;

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap