FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Don't Use MyISAM ...





codersfriend
We had a seminar, and the speaker also discussed to disregard the use of MyISAM engine but to use INNODB instead which is more stable, less likely to be corrupt, and is safe for multiple transactions

agree with that?
Peterssidan
MyISAM is faster as far as I know so if all people use INNODB it would mean more server load so I don't know what to recommend.

New versions of MySQL use INNODB by default.
Fire Boar
InnoDB has something that MyISAM doesn't: consistency. MyISAM is a bit of a hack actually - it doesn't support many of the features that make databases useful, for instance foreign key dependencies. So absolutely: avoid MyISAM.
D'Artagnan
think wide not narrow, myisam has its uses as much as innodb has, its all about using it the right way
jmraker
One kind of big difference between the 2 of them is where the table data is stored. In MyISAM all the data is stored in a .MYD and the index data is stored in a .MYI for every table.

With InnoDB everything is stored in one big file that can grow too large.

I upgraded wamp (a big version jump where it was installed somewhere else) a few months ago and forgot to make a backup and move over a database.
I spent last night trying to figure out where the data went. Luckily I saved the older mysql daemon plus it's old database directory and once it was reconfigured to use the different directory the data was there to backup. Only 4 of the lesser used tables were in MyISAM with data, the rest of the data was in a huge file.

So I guess there's a big difference when you upgrade mysql and make that kind of mistake.

--
About the big InnoDB file. The mysql documentation says it can grow too large for the filesystem which is sometimes 2 gig. I'd like to know what it does then

Quote:
InnoDB is not aware of the file system maximum file size, so be cautious on file systems where the maximum file size is a small value such as 2GB
http://dev.mysql.com/doc/refman/5.0/en/innodb-configuration.html
Fire Boar
Only very old filesystems still have that 2GB limit. FAT32, in particular, which was succeeded by the NTFS filesystem in the year 2000. If you're using a Windows from the NT/XP era or later, you're fine. Similarly, if you're using Linux with the ext2 filesystem (which was introduced in 1993) or later, there is no 2GB limit. Pretty much the only filesystem where one is likely to have problems is in Windows FAT32, and nearly every computer running Windows these days uses NTFS.
ogah
why compare MyISAM and INNODB?
why not compare mysql and mysqli or other database?

PHP developer are planning to kill the PHP original MySQL extension.
sonam
ogah wrote:
why compare MyISAM and INNODB?
why not compare mysql and mysqli or other database?

PHP developer are planning to kill the PHP original MySQL extension.


Right, I am shocked Shocked when I first time hear this information. Now I am on the way to start new site with mysql and I am not sure is it better to learn mysqli and build site with mysqli or rebuild mysql commands letter. Rolling Eyes

BTW I don't know why I like MyISAM more thne INNODB. I think because there is one search engine possibilities what INNODB don't have.

Sonam
Fire Boar
sonam wrote:
ogah wrote:
why compare MyISAM and INNODB?
why not compare mysql and mysqli or other database?

PHP developer are planning to kill the PHP original MySQL extension.


Right, I am shocked Shocked when I first time hear this information. Now I am on the way to start new site with mysql and I am not sure is it better to learn mysqli and build site with mysqli or rebuild mysql commands letter. Rolling Eyes

BTW I don't know why I like MyISAM more thne INNODB. I think because there is one search engine possibilities what INNODB don't have.

Sonam


So much misinformation in these two posts. Let me explain.

MyISAM and InnoDB are two completely separate database storage engines for MySQL. This topic is about the relative merits of each. In short, InnoDB is a more sophisticated engine and should be used in preference to MyISAM wherever possible, for reasons already described in this topic. "Search engine possibilities" have nothing to do with your database storage engine.

Now, the mysql extension is indeed being removed. Why? Because it is awful. There are no query preparation methods, it is procedural not object-oriented, and code written using it is very vulnerable to SQL injections unless the programmer is careful (and, given what I have seen on Frihost, this is definitely not the case for a vast number of people). The extension is so broken that it contains a function "mysql_escape_string" which doesn't work, and "mysql_real_escape_string" which does, but had to be given a different name to avoid conflicting with existing code which used the broken version and worked around it. Come on.

So what's mysqli, and why is it better? It's a much better designed extension, written with more recent versions of MySQL in mind and supporting features such as prepared queries which, if written properly, are immune to SQL injection, and if written carelessly are at least less likely to be vulnerable than those passed straight to mysql_query. As far as capabilities go, the mysqli extension exceeds the mysql extension in many areas and equals it in all others. It also offers the choice of either procedural or object-oriented code, at the programmer's preference.

And just to be clear, mysqli is not a database management system, it is a PHP extension for interfacing with a MySQL database, just like the mysql extension. To distinguish the two, throughout this post I have written MySQL (with capitals) to mean the database management system, and mysql to mean the legacy PHP extension.

However, mysql vs mysqli has nothing to do with this topic.
gueda
I only use Imnodb. I read an explanation times ago where said it's better and how I studied by myseld, I really don't know.
But I think it's how "D'Artagnan said:
Quote:
myisam has its uses as much as innodb has, its all about using it the right way


ogah wrote:
why compare MyISAM and INNODB?
why not compare mysql and mysqli or other database?

PHP developer are planning to kill the PHP original MySQL extension.



Yes, I thought this yesterday. I was doing some things on my site when, suddenly, I remembered about php5 and its changes.

Now, I am reading a lot to understand more about sqli and, of course, I'll rewrite every codes...
Related topics
HTTP AUTH with PHP and mySQL
Build an online dictionary by PHP/MySQL
SLOW UPLOADING AN SQL FILE
got this error..
Visitor notebook for php
[RESOLVED] RETARDED ERROR!
MySQL Database
PHP Tutorial: Basic Shoutbox w/ MySQL
Baza danych
[HELP] PHP -> Scripting
Creating a poll
[man]Servidor Web Personal (Tutorial)
sql in frihost
simple login script
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.