Showing entries 30731 to 30740 of 45392
« 10 Newer Entries | 10 Older Entries »
How much space does empty Innodb table take ?

How much space would empty MyISAM table take ? Probably 8K for .frm file, 1KB for .MYI file and 0 for MYD file. .MYI file can be larger if you have many indexes.

How much space will Innodb take:

PLAIN TEXT SQL:

  1. mysql> CREATE TABLE test_innodb(a int, b int) engine=innodb;
  2. Query OK, 0 rows affected (0.30 sec)

Check out files (using Innodb File Per Table)

-rw-rw---- 1 mysql mysql 8578 Dec 16 20:33 test_innodb.frm
-rw-rw---- 1 mysql mysql 98304 Dec 16 20:33 test_innodb.ibd

So we get about 100K and so about 10 times more for MyISAM. This is ignored space which needs to be allocated in main tablespace for Innodb data dictionary. But that one is pretty small.

This is the good reason to avoid having very small Innodb tables - they will …

[Read more]
Announcing Percona XtraDB Storage Engine: a Drop-in Replacement for Standard InnoDB

Today we officially announce our new storage engine, "Percona XtraDB", which is based on the InnoDB storage engine. It's 100% backwards-compatible with standard InnoDB, so you can use it as a drop-in replacement in your current environment. It is designed to scale better on modern hardware, and includes a variety of other features useful in high performance environments.

Percona XtraDB includes all of InnoDB's ACID-compliant design and advanced MVCC architecture, and adds features, more tunability, more metrics, more scalability on many cores, and better memory usage. We choose features and fixes based on customer requests and on our best judgment of real-world needs. We have not included all the InnoDB patches available. For example Google's well-known InnoDB patch set is omitted (at least for now).

The first version of our new storage engine is 1.0.2-1, which is forked from InnoDB-plugin-1.0.2. …

[Read more]
SQL evil: the NATURAL join keyword

Apart from lots of interactivity, I tend to use anecdotes and humour when teaching a MySQL training course, as it really helps people to remember.

Sometimes I call something "evil" (no I'm not religious), and attach a little story to it. One example the NATURAL join. It's not a join type (like inner, left outer, right outer), it's a modifier keyword that can be used with any join type, and it directs the way the join is resolved.

Instead of specifying a join condition through ON, USING or a WHERE clause, the NATURAL keyword tells the server to match up any column names between the two tables, and automatically use those columns to resolve the join. For example, if two tables that you're doing a natural join on have a column foo_id, the server would automatically use that column. But of course a …

[Read more]
Fun with ☃, ☢, and, ☣ :)

Don't try this at home :)



create table ☃ (☢ int, ☣ int, key ☢ (☢), key ☣ (☢,☣)) ENGINE=MYISAM;
insert into ☃ (☢) values (1);
insert into ☃ (☢) values (2);
explain select ☢ from ☃ where ☢=1;
drop table ☃;


And no... this is not for live code, it is in a test case I am working on for Drizzle.

Logging to DB after PHP is done generating content

Oh how I love register_shutdown_function of PHP. This bad baby will execute at the end of the scripts in call order. So, how is this useful?

Say you want to log some action, but that logging DB is on another server. Additionally you do not want to take into account that writing to the other server may break your transaction because of timeouts if logged in the middle of a transaction. Another use case: you do not want to change a bunch of code in different places to batch all logging routines up.


public function __construct($platform){
parent::__construct($platform);
register_shutdown_function(array($this, 'afterProcess'));
}


public function afterProcess(){

foreach($this->getDataThatChange() as $key => $values){
$insert_data[] = $values;
}

[Read more]
Interview with Stewart Smith, Drizzle/MySQL Cluster

Stewart Smith, a former member of the MySQL Cluster team recently decided to move on and work as a programmer on the Drizzle project. We wanted to catch with Stewart on both MySQL Cluster on Windows and what's he up to now.

Interview with Masood Mortazavi, MySQL Engineering Manager at Sun

Masood Mortazavi is an Engineering Manager at the Sun Database Group. After the acquisition of MySQL, and along with the rest of Sun's original database technology group, he joined the MySQL organization to form the larger Sun Database Group. In this interview, Masood talks with Lenz about the flexibility and diversity of Sun as a workplace, his life prior to joining Sun and his current assignment to improve the MySQL code contribution process.

Petr Pisl shows off SQL Code Completion

Petr does a nice job of demonstrating this feature in action. The comments are pretty enthusiastic, which is quite encouraging (I like this one: "My god, this is genius, I would have never thought about something like this."). Cool.

http://blogs.sun.com/netbeansphp/entry/sql_code_completion_in_the

Recipe for celebrating MySQL 5.1 GA

Here is my personal recipe for celebrating MySQL 5.1 GA (called “Five shot one“):

Ingredients:

SQL Antipatterns Tutorial at the MySQL Conf & Expo 2009

My tutorial proposal was accepted, so I'll be speaking April 20 at the MySQL Conference & Expo 2009 in Santa Clara.My tutorial is "SQL Antipatterns Strike Back." SQL Antipatterns are frequent blunders committed by software developers, both novice and expert.I gave a similar tutorial last year, and I think it was well-received. I'm keeping and improving the most interesting topics from last

Showing entries 30731 to 30740 of 45392
« 10 Newer Entries | 10 Older Entries »