RE: Reading .MYD file of Mysql Tables

2011-01-10 Thread Rolando Edwards
In reality, you better off manipulating the MyISAM tables via SQL.

However, if you really are that adventurous about low-level reads of MyISAM 
tables, I have a crazy suggestion for you !!!

The old MySQL book used as reference to MySQL 3.23/4.0 describes manipulating a 
MyISAM table with an API that reminds me so much of manipulating DBF files via 
the DBASE/Clipper/FoxPro programming language.

The book is called MySQL Reference Manual (ISBN 0-596-00265-3 ,Published June 
2002)
http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dstripbooksfield-keywords=0-596-00265-3
It was Chapter 6, pages 512,513 Section 6.4.2 HANDLER Syntax.

This same information appears at the following URLs:
http://dev.mysql.com/doc/refman/5.5/en/handler.html
http://download.oracle.com/docs/cd/E17952_01/refman-5.0-en/handler.html

Keep mind that this is a read-only MyISAM API. No low-level writes are 
available with that API.

If you need to edit the MyISAM table structure, you should definitely used 
ALTER TABLE.

However, if you really are that adventurous about table structure manipulation 
of MyISAM tables, I have a crazy suggestion for you !!!

A more recent book, called High Performance MySQL, Second Edition (ISBN 
0-0596-10171-8, Published June 2008)
http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dstripbooksfield-keywords=0-596-10171-8
has a section Speeding up ALTER TABLE on Pages 146-149 on how to doctor the 
.MYI file to add new columns and the gotchas in doing it that way.

If you want to writes and updated to column data in a MyISAM table, I have no 
crazy suggestions except one : Download the C source code for the MyISAM 
storage engine, study it, and have fun with it.

If you just need faster write performance on MyISAM tables, use one or both of 
the following:
1) INSERT DELAYED for a single row (be prepared to suffer up to one second of 
data loss in the event of a crash)
2) LOAD DATA INFILE for bulk loading of data (please set 
bulk_insert_buffer_size to something like 512M)
3) More suggestions at 
http://kevin.vanzonneveld.net/techblog/article/improve_mysql_insert_performance/

I hope these ramblings of mine helped. Please write back to the MySQL Lists and 
let us all know what you tried and if it worked. Have a good day !!!

Rolando A. Edwards
MySQL DBA (SCMDBA)

155 Avenue of the Americas, Fifth Floor
New York, NY 10013
212-625-5307 (Work)
201-660-3221 (Cell)
AIM  Skype : RolandoLogicWorx
redwa...@logicworks.net
http://www.linkedin.com/in/rolandoedwards


-Original Message-
From: Adarsh Sharma [mailto:adarsh.sha...@orkash.com] 
Sent: Sunday, January 09, 2011 11:14 PM
To: mysql@lists.mysql.com
Subject: Reading .MYD file of Mysql Tables
Dear all,

I am facing a issue which should be resolved by editing .MYD file of a 
Table.

I know there are 3 files foe a MyISAM table in Mysql but i want to read 
and edit some changes in .MYD file.

If it is possible , Can anyone PLease tell me the way to do this.


Thanks  Regards

Adarsh Sharma

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=redwa...@logicworks.net


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Reading .MYD file of Mysql Tables

2011-01-09 Thread Adarsh Sharma

Dear all,

I am facing a issue which should be resolved by editing .MYD file of a 
Table.


I know there are 3 files foe a MyISAM table in Mysql but i want to read 
and edit some changes in .MYD file.


If it is possible , Can anyone PLease tell me the way to do this.


Thanks  Regards

Adarsh Sharma

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Reading .MYD file of Mysql Tables

2011-01-09 Thread Reindl Harald
Why in the world will you manually change a binary file form a db-server
instead using sql-statements?

I would mean this is russian roulette with no winning chance

Am 10.01.2011 05:14, schrieb Adarsh Sharma:
 Dear all,
 
 I am facing a issue which should be resolved by editing .MYD file of a Table.
 
 I know there are 3 files foe a MyISAM table in Mysql but i want to read and 
 edit some changes in .MYD file.
 
 If it is possible , Can anyone PLease tell me the way to do this.
 
 
 Thanks  Regards
 Adarsh Sharma



signature.asc
Description: OpenPGP digital signature