<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/">

<channel>
  <title>Planet MySQL</title>
  <link>http://www.planetmysql.org/</link>
  <pubDate>Sat, 21 Nov 2009 02:00:02 +0000</pubDate>
  <language>en</language>
  <description>Planet MySQL - http://www.planetmysql.org/</description>

  <item>
    <title>DynamoDB: Built in Time Dimension support!</title>
    <guid isPermaLink="false">http://www.nicholasgoodman.com/bt/blog/?p=465</guid>
    <link>http://www.nicholasgoodman.com/bt/blog/2009/11/20/dynamodb-built-in-time-dimension-support/</link>
    <description>DynamoDB (aka LucidDB) is not just another column store database.  Our goal is being the best database for actually doing Business Intelligence; while that means being fast and handling large amounts of data there&amp;#8217;s a lot of other things BI consultant/developers need.  I&amp;#8217;ll continue to post about some of the great BI features that DynamoDB has for the modern datasmiths.
First feature to cover that&amp;#8217;s dead easy, is the built in ability to generate a time dimension, including a Fiscal Calendar attributes.  If you&amp;#8217;re using Mondrian (or come to that, your own custom SQL on a star schema) you need to have a time dimension.  Time is the most important dimension!  Every OLAP model I&amp;#8217;ve ever built uses one!  It something that you, as a datasmith will need to do with every project; that&amp;#8217;s why we&amp;#8217;ve built it right into our database.
Here&amp;#8217;s a dead simple way to create a fully baked, ready to use Time Dimension to use with Mondrian.
-- Create a view that is our time dimension for 10 years, with our
-- Fiscal calendar starting in March (3)
create view dim_time as select * from
table(applib.fiscal_time_dimension (2000, 1, 1, 2009, 12, 31, 3));

OK, that&amp;#8217;s it.  You&amp;#8217;ve created a Time Dimension!  * see NOTE at end of post.
So, we&amp;#8217;ve created our time dimension, complete with a Fiscal calendar for 10 years in a single statement!  Awesome - but what does it contain?

-- Structure of new time dimension
select &quot;TABLE_NAME&quot;, &quot;COLUMN_NAME&quot;, &quot;DATATYPE&quot; from sys_root.dba_columns
where table_name = 'DIM_TIME';
+-------------+---------------------------------+-----------+
| TABLE_NAME  |           COLUMN_NAME           | DATATYPE  |
+-------------+---------------------------------+-----------+
| DIM_TIME    | FISCAL_YEAR_END_DATE            | DATE      |
| DIM_TIME    | FISCAL_YEAR_START_DATE          | DATE      |
| DIM_TIME    | FISCAL_QUARTER_NUMBER_IN_YEAR   | INTEGER   |
| DIM_TIME    | FISCAL_QUARTER_END_DATE         | DATE      |
| DIM_TIME    | FISCAL_QUARTER_START_DATE       | DATE      |
| DIM_TIME    | FISCAL_MONTH_NUMBER_IN_YEAR     | INTEGER   |
| DIM_TIME    | FISCAL_MONTH_NUMBER_IN_QUARTER  | INTEGER   |
| DIM_TIME    | FISCAL_MONTH_END_DATE           | DATE      |
| DIM_TIME    | FISCAL_MONTH_START_DATE         | DATE      |
| DIM_TIME    | FISCAL_WEEK_NUMBER_IN_YEAR      | INTEGER   |
| DIM_TIME    | FISCAL_WEEK_NUMBER_IN_QUARTER   | INTEGER   |
| DIM_TIME    | FISCAL_WEEK_NUMBER_IN_MONTH     | INTEGER   |
| DIM_TIME    | FISCAL_WEEK_END_DATE            | DATE      |
| DIM_TIME    | FISCAL_WEEK_START_DATE          | DATE      |
| DIM_TIME    | FISCAL_DAY_NUMBER_IN_YEAR       | INTEGER   |
| DIM_TIME    | FISCAL_DAY_NUMBER_IN_QUARTER    | INTEGER   |
| DIM_TIME    | FISCAL_YEAR                     | INTEGER   |
| DIM_TIME    | YEAR_END_DATE                   | DATE      |
| DIM_TIME    | YEAR_START_DATE                 | DATE      |
| DIM_TIME    | QUARTER_END_DATE                | DATE      |
| DIM_TIME    | QUARTER_START_DATE              | DATE      |
| DIM_TIME    | MONTH_END_DATE                  | DATE      |
| DIM_TIME    | MONTH_START_DATE                | DATE      |
| DIM_TIME    | WEEK_END_DATE                   | DATE      |
| DIM_TIME    | WEEK_START_DATE                 | DATE      |
| DIM_TIME    | CALENDAR_QUARTER                | VARCHAR   |
| DIM_TIME    | YR                              | INTEGER   |
| DIM_TIME    | QUARTER                         | INTEGER   |
| DIM_TIME    | MONTH_NUMBER_OVERALL            | INTEGER   |
| DIM_TIME    | MONTH_NUMBER_IN_YEAR            | INTEGER   |
| DIM_TIME    | MONTH_NUMBER_IN_QUARTER         | INTEGER   |
| DIM_TIME    | MONTH_NAME                      | VARCHAR   |
| DIM_TIME    | WEEK_NUMBER_OVERALL             | INTEGER   |
| DIM_TIME    | WEEK_NUMBER_IN_YEAR             | INTEGER   |
| DIM_TIME    | WEEK_NUMBER_IN_QUARTER          | INTEGER   |
| DIM_TIME    | WEEK_NUMBER_IN_MONTH            | INTEGER   |
| DIM_TIME    | DAY_FROM_JULIAN                 | INTEGER   |
| DIM_TIME    | DAY_NUMBER_OVERALL              | INTEGER   |
| DIM_TIME    | DAY_NUMBER_IN_YEAR              | INTEGER   |
| DIM_TIME    | DAY_NUMBER_IN_QUARTER           | INTEGER   |
| DIM_TIME    | DAY_NUMBER_IN_MONTH             | INTEGER   |
| DIM_TIME    | DAY_NUMBER_IN_WEEK              | INTEGER   |
| DIM_TIME    | WEEKEND                         | VARCHAR   |
| DIM_TIME    | DAY_OF_WEEK                     | VARCHAR   |
| DIM_TIME    | TIME_KEY                        | DATE      |
| DIM_TIME    | TIME_KEY_SEQ                    | INTEGER   |
+-------------+---------------------------------+-----------+

-- Let's look at a few rows
select time_key_seq, time_key, yr, month_number_in_year, fiscal_year
, fiscal_month_number_in_year from dim_time;
+---------------+-------------+-------+-----------------------+--------------+------------------------------+
| TIME_KEY_SEQ  |  TIME_KEY   |  YR   | MONTH_NUMBER_IN_YEAR  | FISCAL_YEAR  | FISCAL_MONTH_NUMBER_IN_YEAR  |
+---------------+-------------+-------+-----------------------+--------------+------------------------------+
| 1             | 2000-01-01  | 2000  | 1                     | 2000         | 11                           |
| 2             | 2000-01-02  | 2000  | 1                     | 2000         | 11                           |
| 3             | 2000-01-03  | 2000  | 1                     | 2000         | 11                           |
| 4             | 2000-01-04  | 2000  | 1                     | 2000         | 11                           |
| 5             | 2000-01-05  | 2000  | 1                     | 2000         | 11                           |
| 6             | 2000-01-06  | 2000  | 1                     | 2000         | 11                           |
| 7             | 2000-01-07  | 2000  | 1                     | 2000         | 11                           |
| 8             | 2000-01-08  | 2000  | 1                     | 2000         | 11                           |
| 9             | 2000-01-09  | 2000  | 1                     | 2000         | 11                           |
| 10            | 2000-01-10  | 2000  | 1                     | 2000         | 11                           |
+---------------+-------------+-------+-----------------------+--------------+------------------------------+

Generating the Time Dimension is accomplished using DynamoDBs ability to include Java based UDF Table Functions.  Table functions are really powerful - they allow a BI developer to write custom functions that output a &amp;#8220;table&amp;#8221; that can be queried like ANY OTHER TABLE (mostly).  Check out the wiki page FarragoUdx if your interested.
And of course: download LucidDB and give it a whirl!
NOTE: To be candid, doing it as a view isn&amp;#8217;t the best approach.  For anything beyond tiny (5 million +) we should actually create the table, and do an INSERT INTO SELECT * FROM TABLE(fiscal_time_dimension).</description>
    <content:encoded><![CDATA[<p>DynamoDB (aka <a href="http://www.luciddb.org">LucidDB</a>) is not just another column store database.  Our goal is being the best database for actually <em>doing</em> Business Intelligence; while that means being fast and handling large amounts of data there&#8217;s a lot of other things BI consultant/developers need.  I&#8217;ll continue to post about some of the great BI features that DynamoDB has for the modern datasmiths.</p>
<p>First feature to cover that&#8217;s dead easy, is the built in ability to <a href="http://pub.eigenbase.org/wiki/LucidDbAppLib_FISCAL_TIME_DIMENSION">generate a time dimension</a>, including a Fiscal Calendar attributes.  If you&#8217;re using Mondrian (or come to that, your own custom SQL on a star schema) you need to have a time dimension.  <strong>Time is the most important dimension!</strong>  Every OLAP model I&#8217;ve ever built uses one!  It something that you, as a datasmith will need to do with every project; <strong>that&#8217;s why we&#8217;ve built it right into our database</strong>.</p>
<p>Here&#8217;s a dead simple way to create a fully baked, ready to use Time Dimension to use with Mondrian.</p>
<pre>-- Create a view that is our time dimension for 10 years, with our
-- Fiscal calendar starting in March (3)
create view dim_time as select * from
table(applib.fiscal_time_dimension (2000, 1, 1, 2009, 12, 31, 3));
</pre>
<p><strong>OK, that&#8217;s it.  You&#8217;ve created a Time Dimension!  </strong><em>* see NOTE at end of post.</p>
<p></em>So, we&#8217;ve created our time dimension, complete with a Fiscal calendar for 10 years in a single statement!  Awesome - but what does it contain?</p>
<pre>
-- Structure of new time dimension
select "TABLE_NAME", "COLUMN_NAME", "DATATYPE" from sys_root.dba_columns
where table_name = 'DIM_TIME';
+-------------+---------------------------------+-----------+
| TABLE_NAME  |           COLUMN_NAME           | DATATYPE  |
+-------------+---------------------------------+-----------+
| DIM_TIME    | FISCAL_YEAR_END_DATE            | DATE      |
| DIM_TIME    | FISCAL_YEAR_START_DATE          | DATE      |
| DIM_TIME    | FISCAL_QUARTER_NUMBER_IN_YEAR   | INTEGER   |
| DIM_TIME    | FISCAL_QUARTER_END_DATE         | DATE      |
| DIM_TIME    | FISCAL_QUARTER_START_DATE       | DATE      |
| DIM_TIME    | FISCAL_MONTH_NUMBER_IN_YEAR     | INTEGER   |
| DIM_TIME    | FISCAL_MONTH_NUMBER_IN_QUARTER  | INTEGER   |
| DIM_TIME    | FISCAL_MONTH_END_DATE           | DATE      |
| DIM_TIME    | FISCAL_MONTH_START_DATE         | DATE      |
| DIM_TIME    | FISCAL_WEEK_NUMBER_IN_YEAR      | INTEGER   |
| DIM_TIME    | FISCAL_WEEK_NUMBER_IN_QUARTER   | INTEGER   |
| DIM_TIME    | FISCAL_WEEK_NUMBER_IN_MONTH     | INTEGER   |
| DIM_TIME    | FISCAL_WEEK_END_DATE            | DATE      |
| DIM_TIME    | FISCAL_WEEK_START_DATE          | DATE      |
| DIM_TIME    | FISCAL_DAY_NUMBER_IN_YEAR       | INTEGER   |
| DIM_TIME    | FISCAL_DAY_NUMBER_IN_QUARTER    | INTEGER   |
| DIM_TIME    | FISCAL_YEAR                     | INTEGER   |
| DIM_TIME    | YEAR_END_DATE                   | DATE      |
| DIM_TIME    | YEAR_START_DATE                 | DATE      |
| DIM_TIME    | QUARTER_END_DATE                | DATE      |
| DIM_TIME    | QUARTER_START_DATE              | DATE      |
| DIM_TIME    | MONTH_END_DATE                  | DATE      |
| DIM_TIME    | MONTH_START_DATE                | DATE      |
| DIM_TIME    | WEEK_END_DATE                   | DATE      |
| DIM_TIME    | WEEK_START_DATE                 | DATE      |
| DIM_TIME    | CALENDAR_QUARTER                | VARCHAR   |
| DIM_TIME    | YR                              | INTEGER   |
| DIM_TIME    | QUARTER                         | INTEGER   |
| DIM_TIME    | MONTH_NUMBER_OVERALL            | INTEGER   |
| DIM_TIME    | MONTH_NUMBER_IN_YEAR            | INTEGER   |
| DIM_TIME    | MONTH_NUMBER_IN_QUARTER         | INTEGER   |
| DIM_TIME    | MONTH_NAME                      | VARCHAR   |
| DIM_TIME    | WEEK_NUMBER_OVERALL             | INTEGER   |
| DIM_TIME    | WEEK_NUMBER_IN_YEAR             | INTEGER   |
| DIM_TIME    | WEEK_NUMBER_IN_QUARTER          | INTEGER   |
| DIM_TIME    | WEEK_NUMBER_IN_MONTH            | INTEGER   |
| DIM_TIME    | DAY_FROM_JULIAN                 | INTEGER   |
| DIM_TIME    | DAY_NUMBER_OVERALL              | INTEGER   |
| DIM_TIME    | DAY_NUMBER_IN_YEAR              | INTEGER   |
| DIM_TIME    | DAY_NUMBER_IN_QUARTER           | INTEGER   |
| DIM_TIME    | DAY_NUMBER_IN_MONTH             | INTEGER   |
| DIM_TIME    | DAY_NUMBER_IN_WEEK              | INTEGER   |
| DIM_TIME    | WEEKEND                         | VARCHAR   |
| DIM_TIME    | DAY_OF_WEEK                     | VARCHAR   |
| DIM_TIME    | TIME_KEY                        | DATE      |
| DIM_TIME    | TIME_KEY_SEQ                    | INTEGER   |
+-------------+---------------------------------+-----------+

-- Let's look at a few rows
select time_key_seq, time_key, yr, month_number_in_year, fiscal_year
, fiscal_month_number_in_year from dim_time;
+---------------+-------------+-------+-----------------------+--------------+------------------------------+
| TIME_KEY_SEQ  |  TIME_KEY   |  YR   | MONTH_NUMBER_IN_YEAR  | FISCAL_YEAR  | FISCAL_MONTH_NUMBER_IN_YEAR  |
+---------------+-------------+-------+-----------------------+--------------+------------------------------+
| 1             | 2000-01-01  | 2000  | 1                     | 2000         | 11                           |
| 2             | 2000-01-02  | 2000  | 1                     | 2000         | 11                           |
| 3             | 2000-01-03  | 2000  | 1                     | 2000         | 11                           |
| 4             | 2000-01-04  | 2000  | 1                     | 2000         | 11                           |
| 5             | 2000-01-05  | 2000  | 1                     | 2000         | 11                           |
| 6             | 2000-01-06  | 2000  | 1                     | 2000         | 11                           |
| 7             | 2000-01-07  | 2000  | 1                     | 2000         | 11                           |
| 8             | 2000-01-08  | 2000  | 1                     | 2000         | 11                           |
| 9             | 2000-01-09  | 2000  | 1                     | 2000         | 11                           |
| 10            | 2000-01-10  | 2000  | 1                     | 2000         | 11                           |
+---------------+-------------+-------+-----------------------+--------------+------------------------------+
</pre>
<p>Generating the Time Dimension is accomplished using DynamoDBs ability to include Java based UDF Table Functions.  Table functions are really powerful - they allow a BI developer to write custom functions that output a &#8220;table&#8221; that can be queried like ANY OTHER TABLE (<em>mostly</em>).  Check out the wiki page <a href="http://pub.eigenbase.org/wiki/FarragoUdx">FarragoUdx</a> if your interested.</p>
<p>And of course: download LucidDB and give it a whirl!</p>
<p><strong><em>NOTE: </em></strong><em>To be candid, doing it as a view isn&#8217;t the best approach.  For anything beyond tiny (5 million +) we should actually create the table, and do an INSERT INTO SELECT * FROM TABLE(fiscal_time_dimension).</em></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22335&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22335&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 21:23:22 +0000</pubDate>
    <dc:creator>Nicholas Goodman</dc:creator>
    <category>DynamoBI</category>
    <category>Open Source</category>
  </item>

  <item>
    <title>GROUP UNCONCAT</title>
    <guid isPermaLink="false">http://thenoyes.com/littlenoise/?p=92</guid>
    <link>http://thenoyes.com/littlenoise/?p=92</link>
    <description>Dunno why you&amp;#8217;d rather do this in SQL than in your application layer, but if you do, here&amp;#8217;s one way to turn a delimited string of values back into multiple rows - just the opposite of GROUP_CONCAT:
SET @sourceString = 'a,b,c,d,e';
SET @sql = CONCAT('INSERT INTO t VALUES (\'', REPLACE(@sourceString, ',', '\'),(\''), '\')');
PREPARE myStmt FROM @sql;
EXECUTE myStmt;
Just to show what&amp;#8217;s going on:
mysql&gt; SELECT @sql;
+----------------------------------------------------+
| @sql                                               |
+----------------------------------------------------+
| INSERT INTO t VALUES ('a'),('b'),('c'),('d'),('e') |
+----------------------------------------------------+
</description>
    <content:encoded><![CDATA[<p>Dunno why you&#8217;d rather do this in SQL than in your application layer, but if you do, here&#8217;s one way to turn a delimited string of values back into multiple rows - just the opposite of GROUP_CONCAT:</p>
<pre>SET @sourceString = 'a,b,c,d,e';
SET @sql = CONCAT('INSERT INTO t VALUES (\'', REPLACE(@sourceString, ',', '\'),(\''), '\')');
PREPARE myStmt FROM @sql;
EXECUTE myStmt;</pre>
<p>Just to show what&#8217;s going on:</p>
<pre>mysql> SELECT @sql;
+----------------------------------------------------+
| @sql                                               |
+----------------------------------------------------+
| INSERT INTO t VALUES ('a'),('b'),('c'),('d'),('e') |
+----------------------------------------------------+
</pre><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22336&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22336&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 21:18:24 +0000</pubDate>
    <dc:creator>Scott Noyes</dc:creator>
    <category>MySQL</category>
  </item>

  <item>
    <title>Paul McCullagh answers your questions about PBXT</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1771</guid>
    <link>http://www.mysqlperformanceblog.com/2009/11/20/paul-mccullagh-answers-your-questions-about-pbxt/</link>
    <description>Following on from our earlier announcement, Paul McCullagh has responded with the answers to your questions &amp;#8211; as well as a few I gathered from other Percona folks, and attendees of OpenSQL Camp.  Thank you Paul!
What’s the &amp;#8220;ideal&amp;#8221; use case for the PBXT engine, and how does it compare in performance?  When would I use PBXT instead of a storage engine like MyISAM, InnoDB or XtraDB?
Unfortunately it is not possible to point to a specific category of applications and say, &amp;#8220;PBXT will be better here, so try it&amp;#8221;.  PBXT is a general purpose transactional storage engine, designed to perform well on a broad range of tasks, much like InnoDB.  However, PBXT&amp;#8217;s log-based architecture makes performance characteristics different to both MyISAM and InnoDB/XtraDB. Tests show that PBXT&amp;#8217;s performance is similar to InnoDB but, depending on your database designed and the application, it can be faster.
PBXT is a community project and, of course, we depend on users trying it out. In the long run, this will determine to what extent we are able to continue to develop and improve the engine.  So, despite this rather vague answer, we are hoping that more people try it out, and work with us to improve the engine as necessary.  My thanks to all who are already doing this!  
I think I remember reports that PBXT (at an early stage) out performed InnoDB with INSERTS and UPDATES (but not SELECTS). That would make PBXT very interesting for non-SELECT-intensive applications (finance, production management etc.) in my opinion.  Is this the case, and do you have any recent benchmarks available?
This is no longer necessarily the case. For example a test (http://mysqlha.blogspot.com/2009/03/pbxt-is-fast-no-kidding.html) by Mark Callaghan shows that PBXT can actually out perform InnoDB with SELECTs under circumstances.
The implementation of full-durability has changed the performance characteristics of PBXT from &amp;#8220;MyISAM-like&amp;#8221; to more InnoDB-like. Originally PBXT was conceived as an engine that would be somewhere between MyISAM and InnoDB in both performance and features. The early version of PBXT was not fully durable (equivalent to innodb_flush_log_at_trx_commit=2).
A major change was completed at the beginning of last year with the implementation of full-durability. In doing this it was important to keep the log-based architecture which was the reason for the high write performance of earlier versions.
Traditional transactional implementations suffer from the problem that a backlog of asynchronous writes accumulate until it swamps the engine. There has been a lot of work on both InnoDB and XtraDB to solve this problem. The key words here are fuzzy and adaptive checkpointing (the former, originally implementation by Heiki for InnoDB, and the latter, an excellent addition to XtraDB).
Both methods improve the management of the asynchronous writes. The idea behind the log-based solution, on the other hand, is to avoid the accumulating a backlog of asynchronous writes, but writing synchronously.
Although write performance is comparable with InnoDB, I am not entirely convinced that PBXT&amp;#8217;s implementation of the log-based I/O is optimal at this stage. This is ongoing work for PBXT 1.5.
Morgan notes: As well as Adaptive Checkpointing, Oracle has also been working on Adaptive Flushing for the InnoDB Plugin.  The engine being &amp;#8217;swamped&amp;#8217; problem that Paul is referring to is best described visually &amp;#8211; see this post for more info.
What were the hard decisions or trade-offs that you had to make when designing PBXT?
If you read the white paper from 2006 (http://primebase.org/download/pbxt_white_paper.pdf) you will notice that the original design was uncompromisingly MVCC-based.  Some of this has been changed to make PBXT more InnoDB-like, but other principles have remained.
Pure-MVCC does not do any locking. Read locks are not required because each transaction effectively gets its own snapshot of the database. And write locks are not acquired when updating. Instead, the application can hit a &amp;#8220;optimistic lock error&amp;#8221; if a record is updated by another user.
Now PBXT does acquire locks for 2 reasons: to support SELECT FOR UPDATE, and to avoid optimistic locking errors. This makes PBXT&amp;#8217;s behavior identical to InnoDB in REPEATABLE READ mode.
On the other hand, there are currently no plans to implement InnoDB style &amp;#8220;gap locking&amp;#8221;. Gap locking effectively involves locking rows that do not exist. This, in turn, means that PBXT transactions are not SERIALIZABLE.  A result of this is that statement-based replication is not supported by the engine.
Another hard decision was not to implement clustered indexes which I mentioned in more details later.
How does online backup work in PBXT, and is incremental backup possible?
A recent version of PBXT (1.0.09) supports the MySQL Backup API which was originally implemented in MySQL 6.0. This feature is now scheduled for an upcoming version of MySQL 5.4.
The Backup API makes it possible to pull a consistent snapshot of an entire database even when tables use different engine types. The API does not yet support incremental backup, but this is planned.
Internally this feature is implemented by PBXT using an MVCC-based consistent snapshot.
Does PBXT have a maintenance thread like InnoDB&amp;#8217;s main thread?
PBXT has several system threads, that are responsible for various maintenance tasks. The most important of these are the &amp;#8220;Writer&amp;#8221;, the &amp;#8220;Sweeper&amp;#8221; and the &amp;#8220;Checkpointer&amp;#8221;;

 The Writer transfers data from the transaction log to the database table files. This task runs constantly and is the main source of asynchronous I/O in the engine.
 The Sweeper is a thread unique to the PBXT architecture. It&amp;#8217;s job is to clean up after a transaction. Basically it recognizes which record versions are no longer needed and deletes them from the database.
 The Checkpointer flushes the data written by the Writer to disk. It is also responsible for writing consistent snapshots of the index files to disk. The frequency of checkpoints, as with other engines like InnoDB, determines the recovery time.

Does PBXT support clustered indexes?
No, currently it does not. This is one of the original design decisions (as raised by a previous question).  Two things contributed to this decision:

 Supporting clustered indexes would have made the implementation of PBXT more complicated than I would have liked. My goal was to make PBXT as simple as possible, so that it is easy to maintain the code and add features.
 I believe clustered indexes are becoming less relevant with the rise of Solid State technology. As random read access times decrease clustering of data will become less and less important.

What is the page size in PBXT, and can it be tuned?
PBXT uses 16K pages for the index data and (approximately) 32K pages for the table data. Both sizes can be set using compile time switches. However, if the index page size is changed, then the indices need to be rebuilt, which can be done by REPAIR TABLE.  The table data page size does not require a rebuild because a page of records in the table is just a group of records (not an actual fixed length page).
Are there any differences in the PBXT implementation of MVCC that might surprise experienced InnoDB DBAs?  Also &amp;#8211; In MVCC does it keep the versions in indexes, and can PBXT use MVCC for index scans?
If you are using InnoDB in REPEATABLE READ mode, then there is essentially no difference in the isolation paradigm between the two engines.
REPEATABLE READ is often preferred over SERIALIZABLE mode because it allows a greater degree of concurrency while still providing the necessary transaction isolation. So I do not consider the lack of serializability as a serious deficit in the engine. And, fortunately MySQL 5.1. supports row-based replication which makes it possible to do replication while using REPEATABLE READ.
PBXT does use MVCC to do index scans. Basically this means that all types of SELECTs can be done without locking.
Morgan notes: Indexes not using MVCC is one of the main differences in the Falcon storage engine.
PBXT supports row-level locking and foreign keys. Does this create any additional locking overhead that we should be aware of?
Firstly, PBXT does not acquire read locks. A normal SELECT does not lock at all. In addition, an UPDATE or DELETE only acquires a temporary row-lock. This lock is released when the row is updated or deleted because the MVCC system can detect that a row has been changed (and is therefore write locked).
This means that PBXT does not normally need to maintain long lists of row-level locks. This is also the case when a foreign key leads to cascading operations which can affect thousands of rows.
The only case you need to be aware of is SELECT FOR UPDATE. This operation acquires and holds a row-level lock for each row returned by the SELECT. These locks are all stored in RAM. The format is quite compact (especially when row IDs are consecutive) but this can become an issue if millions of rows are selected in this manner.
I should also mention that the consequence of this is that SELECT &amp;#8230; LOCK IN SHARE MODE is currently not supported.
When I evaluate a storage engine my key acceptance criteria are things like backup, concurrency, ACID compliance and crash recovery. As a storage engine developer, what other criteria do you think I should be adding?
Yes, I think you have mentioned the most important criteria. What I can add to this list are 3 things that make developing a storage engine extremely demanding: performance, stability and data integrity.
Of course, as a DBA or database user these aspects are so basic that they are taken for granted.
But engine developers need to keep performance, stability and data integrity in mind constantly. The problem is, they compete with each other: increasing performance often causes instabilities that then have to be fixed. How to optimize the program without compromising data integrity is a constant question.
Relative to maintaining performance, stability and data integrity, adding features to an engine is easy. So I would say that these are the criteria that concern a developer the most.
MySQL supports a &amp;#8220;pluggable storage engine API&amp;#8221;, but it seems that not all the storage engine vendors are able to keep all their code at that layer (Infobright had to make major changes to MySQL itself).  What war stories can you report on in plugging into MySQL?
Unfortunately the &amp;#8220;war&amp;#8221; continues. I have already received several e-mails that PBXT does not compile with the recently released MySQL 5.1.41!
Any dot release can lead to this problem, and I think PBXT is fairly moderate with its integration into MySQL.
My main advantage: I have been able to avoid modifying any part of MySQL to make the engine work. This means that PBXT runs with the standard MySQL/MariaDB distribution.
But this has required quite a bit of creative work, in other words, hacks.
One of the main problems has been running into global locks when calling back into MySQL to do things like open a table, create a session structure (THD) or create a .frm file.
One extreme example of this is PBXT recovery. When MySQL calls the engine &amp;#8220;init&amp;#8221; method on startup it is holding the global LOCK_plugin lock. In init, the engine needs to do recovery. In PBXT&amp;#8217;s case this means opening tables (reading a .frm file), which requires creating a THD. The code to create a THD in turn tries to acquire LOCK_plugin!
Unfortunately a thread hangs if it tries to acquire the same mutex twice, so this just does not work!
We went through quite a few iterations (MySQL code was also changing during the development of 5.1) before we came up with the current solution: create a background thread to do recovery asynchronously. So the thread can wait for the LOCK_plugin to be unlocked before it continues.
The affect is that the init function returns quickly, but the first queries that access PBXT tables may hang waiting for recovery to complete.
PBXT seems to have very few configuration parameters.  Was this an intentional design decision, and do you see it creating opportunities for you in organizations with less internal IT-expertise?
No, this is not by design.
While I try to only add tuning parameters that are absolutely necessary, PBXT is not specifically designed to be self-tuning, because I believe that is a very hard problem to solve in general.
Tuning parameters are often added to an engine in response to performance problems in particular configurations. This is not necessarily a bad thing because it provides DBA&amp;#8217;s with the tools they need.
My goal for PBXT in this regard is twofold:

I hope that most installations can get away with setting a minimum of tuning parameters, in particular, just the cache values.
On the other hand, I aim to provide expert tuning parameters for installations that need to extract maximum performance from the hardware. This work is ongoing.

Morgan notes: There are more in InnoDB/XtraDB now than there were three years ago.  This is probably something that emerges over time as we get to understand more about an engine.
    
    Entry posted by Morgan Tocker |
      No comment
    Add to:  |  |  |  | </description>
    <content:encoded><![CDATA[<p><em>Following on from our earlier announcement, Paul McCullagh has responded with the answers to your questions &#8211; as well as a few I gathered from other Percona folks, and attendees of OpenSQL Camp.  Thank you Paul!</em></p>
<h3>What’s the &#8220;ideal&#8221; use case for the PBXT engine, and how does it compare in performance?  When would I use PBXT instead of a storage engine like MyISAM, InnoDB or XtraDB?</h3>
<p>Unfortunately it is not possible to point to a specific category of applications and say, &#8220;PBXT will be better here, so try it&#8221;.  PBXT is a general purpose transactional storage engine, designed to perform well on a broad range of tasks, much like InnoDB.  However, PBXT&#8217;s log-based architecture makes performance characteristics different to both MyISAM and InnoDB/XtraDB. Tests show that PBXT&#8217;s performance is similar to InnoDB but, depending on your database designed and the application, it can be faster.</p>
<p>PBXT is a community project and, of course, we depend on users trying it out. In the long run, this will determine to what extent we are able to continue to develop and improve the engine.  So, despite this rather vague answer, we are hoping that more people try it out, and work with us to improve the engine as necessary.  My thanks to all who are already doing this! <img src="http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<h3>I think I remember reports that PBXT (at an early stage) out performed InnoDB with INSERTS and UPDATES (but not SELECTS). That would make PBXT very interesting for non-SELECT-intensive applications (finance, production management etc.) in my opinion.  Is this the case, and do you have any recent benchmarks available?</h3>
<p>This is no longer necessarily the case. For example a test (<a href="http://mysqlha.blogspot.com/2009/03/pbxt-is-fast-no-kidding.html" target="_blank">http://mysqlha.blogspot.com/2009/03/pbxt-is-fast-no-kidding.html</a>) by Mark Callaghan shows that PBXT can actually out perform InnoDB with SELECTs under circumstances.</p>
<p>The implementation of full-durability has changed the performance characteristics of PBXT from &#8220;MyISAM-like&#8221; to more InnoDB-like. Originally PBXT was conceived as an engine that would be somewhere between MyISAM and InnoDB in both performance and features. The early version of PBXT was not fully durable (equivalent to innodb_flush_log_at_trx_commit=2).</p>
<p>A major change was completed at the beginning of last year with the implementation of full-durability. In doing this it was important to keep the log-based architecture which was the reason for the high write performance of earlier versions.</p>
<p>Traditional transactional implementations suffer from the problem that a backlog of asynchronous writes accumulate until it swamps the engine. There has been a lot of work on both InnoDB and XtraDB to solve this problem. The key words here are fuzzy and adaptive checkpointing (the former, originally implementation by Heiki for InnoDB, and the latter, an excellent addition to XtraDB).</p>
<p>Both methods improve the management of the asynchronous writes. The idea behind the log-based solution, on the other hand, is to avoid the accumulating a backlog of asynchronous writes, but writing synchronously.</p>
<p>Although write performance is comparable with InnoDB, I am not entirely convinced that PBXT&#8217;s implementation of the log-based I/O is optimal at this stage. This is ongoing work for PBXT 1.5.</p>
<p><i>Morgan notes: As well as Adaptive Checkpointing, Oracle has also been working on Adaptive Flushing for the InnoDB Plugin.  The engine being &#8217;swamped&#8217; problem that Paul is referring to is best described visually &#8211; see <a href="http://www.mysqlperformanceblog.com/2008/11/13/adaptive-checkpointing/">this post</a> for more info.</i></p>
<h3>What were the hard decisions or trade-offs that you had to make when designing PBXT?</h3>
<p>If you read the white paper from 2006 (<a href="http://primebase.org/download/pbxt_white_paper.pdf" target="_blank">http://primebase.org/download/pbxt_white_paper.pdf</a>) you will notice that the original design was uncompromisingly MVCC-based.  Some of this has been changed to make PBXT more InnoDB-like, but other principles have remained.</p>
<p>Pure-MVCC does not do any locking. Read locks are not required because each transaction effectively gets its own snapshot of the database. And write locks are not acquired when updating. Instead, the application can hit a &#8220;optimistic lock error&#8221; if a record is updated by another user.</p>
<p>Now PBXT does acquire locks for 2 reasons: to support SELECT FOR UPDATE, and to avoid optimistic locking errors. This makes PBXT&#8217;s behavior identical to InnoDB in REPEATABLE READ mode.</p>
<p>On the other hand, there are currently no plans to implement InnoDB style &#8220;gap locking&#8221;. Gap locking effectively involves locking rows that do not exist. This, in turn, means that PBXT transactions are not SERIALIZABLE.  A result of this is that statement-based replication is not supported by the engine.</p>
<p>Another hard decision was not to implement clustered indexes which I mentioned in more details later.</p>
<h3>How does online backup work in PBXT, and is incremental backup possible?</h3>
<p>A recent version of PBXT (1.0.09) supports the MySQL Backup API which was originally implemented in MySQL 6.0. This feature is now scheduled for an upcoming version of MySQL 5.4.</p>
<p>The Backup API makes it possible to pull a consistent snapshot of an entire database even when tables use different engine types. The API does not yet support incremental backup, but this is planned.</p>
<p>Internally this feature is implemented by PBXT using an MVCC-based consistent snapshot.</p>
<h3>Does PBXT have a maintenance thread like InnoDB&#8217;s main thread?</h3>
<p>PBXT has several system threads, that are responsible for various maintenance tasks. The most important of these are the &#8220;Writer&#8221;, the &#8220;Sweeper&#8221; and the &#8220;Checkpointer&#8221;;</p>
<ul>
<li> The Writer transfers data from the transaction log to the database table files. This task runs constantly and is the main source of asynchronous I/O in the engine.</li>
<li> The Sweeper is a thread unique to the PBXT architecture. It&#8217;s job is to clean up after a transaction. Basically it recognizes which record versions are no longer needed and deletes them from the database.</li>
<li> The Checkpointer flushes the data written by the Writer to disk. It is also responsible for writing consistent snapshots of the index files to disk. The frequency of checkpoints, as with other engines like InnoDB, determines the recovery time.</li>
</ul>
<h3>Does PBXT support clustered indexes?</h3>
<p>No, currently it does not. This is one of the original design decisions (as raised by a previous question).  Two things contributed to this decision:</p>
<ul>
<li> Supporting clustered indexes would have made the implementation of PBXT more complicated than I would have liked. My goal was to make PBXT as simple as possible, so that it is easy to maintain the code and add features.</li>
<li> I believe clustered indexes are becoming less relevant with the rise of Solid State technology. As random read access times decrease clustering of data will become less and less important.</li>
</ul>
<h3>What is the page size in PBXT, and can it be tuned?</h3>
<p>PBXT uses 16K pages for the index data and (approximately) 32K pages for the table data. Both sizes can be set using compile time switches. However, if the index page size is changed, then the indices need to be rebuilt, which can be done by REPAIR TABLE.  The table data page size does not require a rebuild because a page of records in the table is just a group of records (not an actual fixed length page).</p>
<h3>Are there any differences in the PBXT implementation of MVCC that might surprise experienced InnoDB DBAs?  Also &#8211; In MVCC does it keep the versions in indexes, and can PBXT use MVCC for index scans?</h3>
<p>If you are using InnoDB in REPEATABLE READ mode, then there is essentially no difference in the isolation paradigm between the two engines.</p>
<p>REPEATABLE READ is often preferred over SERIALIZABLE mode because it allows a greater degree of concurrency while still providing the necessary transaction isolation. So I do not consider the lack of serializability as a serious deficit in the engine. And, fortunately MySQL 5.1. supports row-based replication which makes it possible to do replication while using REPEATABLE READ.</p>
<p>PBXT does use MVCC to do index scans. Basically this means that all types of SELECTs can be done without locking.</p>
<p><i>Morgan notes: Indexes not using MVCC is one of the main differences in the Falcon storage engine.</i></p>
<h3>PBXT supports row-level locking and foreign keys. Does this create any additional locking overhead that we should be aware of?</h3>
<p>Firstly, PBXT does not acquire read locks. A normal SELECT does not lock at all. In addition, an UPDATE or DELETE only acquires a temporary row-lock. This lock is released when the row is updated or deleted because the MVCC system can detect that a row has been changed (and is therefore write locked).</p>
<p>This means that PBXT does not normally need to maintain long lists of row-level locks. This is also the case when a foreign key leads to cascading operations which can affect thousands of rows.</p>
<p>The only case you need to be aware of is SELECT FOR UPDATE. This operation acquires and holds a row-level lock for each row returned by the SELECT. These locks are all stored in RAM. The format is quite compact (especially when row IDs are consecutive) but this can become an issue if millions of rows are selected in this manner.</p>
<p>I should also mention that the consequence of this is that SELECT &#8230; LOCK IN SHARE MODE is currently not supported.</p>
<h3>When I evaluate a storage engine my key acceptance criteria are things like backup, concurrency, ACID compliance and crash recovery. As a storage engine developer, what other criteria do you think I should be adding?</h3>
<p>Yes, I think you have mentioned the most important criteria. What I can add to this list are 3 things that make developing a storage engine extremely demanding: performance, stability and data integrity.</p>
<p>Of course, as a DBA or database user these aspects are so basic that they are taken for granted.</p>
<p>But engine developers need to keep performance, stability and data integrity in mind constantly. The problem is, they compete with each other: increasing performance often causes instabilities that then have to be fixed. How to optimize the program without compromising data integrity is a constant question.</p>
<p>Relative to maintaining performance, stability and data integrity, adding features to an engine is easy. So I would say that these are the criteria that concern a developer the most.</p>
<h3>MySQL supports a &#8220;pluggable storage engine API&#8221;, but it seems that not all the storage engine vendors are able to keep all their code at that layer (Infobright had to make major changes to MySQL itself).  What war stories can you report on in plugging into MySQL?</h3>
<p>Unfortunately the &#8220;war&#8221; continues. I have already received several e-mails that PBXT does not compile with the recently released MySQL 5.1.41!</p>
<p>Any dot release can lead to this problem, and I think PBXT is fairly moderate with its integration into MySQL.</p>
<p>My main advantage: I have been able to avoid modifying any part of MySQL to make the engine work. This means that PBXT runs with the standard MySQL/MariaDB distribution.</p>
<p>But this has required quite a bit of creative work, in other words, hacks.</p>
<p>One of the main problems has been running into global locks when calling back into MySQL to do things like open a table, create a session structure (THD) or create a .frm file.</p>
<p>One extreme example of this is PBXT recovery. When MySQL calls the engine &#8220;init&#8221; method on startup it is holding the global LOCK_plugin lock. In init, the engine needs to do recovery. In PBXT&#8217;s case this means opening tables (reading a .frm file), which requires creating a THD. The code to create a THD in turn tries to acquire LOCK_plugin!</p>
<p>Unfortunately a thread hangs if it tries to acquire the same mutex twice, so this just does not work!</p>
<p>We went through quite a few iterations (MySQL code was also changing during the development of 5.1) before we came up with the current solution: create a background thread to do recovery asynchronously. So the thread can wait for the LOCK_plugin to be unlocked before it continues.</p>
<p>The affect is that the init function returns quickly, but the first queries that access PBXT tables may hang waiting for recovery to complete.</p>
<h3>PBXT seems to have very few configuration parameters.  Was this an intentional design decision, and do you see it creating opportunities for you in organizations with less internal IT-expertise?</h3>
<p>No, this is not by design.</p>
<p>While I try to only add tuning parameters that are absolutely necessary, PBXT is not specifically designed to be self-tuning, because I believe that is a very hard problem to solve in general.</p>
<p>Tuning parameters are often added to an engine in response to performance problems in particular configurations. This is not necessarily a bad thing because it provides DBA&#8217;s with the tools they need.</p>
<p>My goal for PBXT in this regard is twofold:</p>
<ol>
<li>I hope that most installations can get away with setting a minimum of tuning parameters, in particular, just the cache values.</li>
<li>On the other hand, I aim to provide expert tuning parameters for installations that need to extract maximum performance from the hardware. This work is ongoing.</li>
</ol>
<p><i>Morgan notes: There are more in InnoDB/XtraDB now than there were three years ago.  This is probably something that emerges over time as we get to understand more about an engine.</i></p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Morgan Tocker |
      <a href="http://www.mysqlperformanceblog.com/2009/11/20/paul-mccullagh-answers-your-questions-about-pbxt/#comments">No comment</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/11/20/paul-mccullagh-answers-your-questions-about-pbxt/&amp;title=Paul%20McCullagh%20answers%20your%20questions%20about%20PBXT" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/11/20/paul-mccullagh-answers-your-questions-about-pbxt/&amp;title=Paul%20McCullagh%20answers%20your%20questions%20about%20PBXT" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/11/20/paul-mccullagh-answers-your-questions-about-pbxt/&amp;title=Paul%20McCullagh%20answers%20your%20questions%20about%20PBXT" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/11/20/paul-mccullagh-answers-your-questions-about-pbxt/&amp;T=Paul%20McCullagh%20answers%20your%20questions%20about%20PBXT" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/11/20/paul-mccullagh-answers-your-questions-about-pbxt/&amp;title=Paul%20McCullagh%20answers%20your%20questions%20about%20PBXT" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22333&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22333&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 19:29:55 +0000</pubDate>
    <dc:creator>Morgan Tocker</dc:creator>
    <category>MariaDB</category>
    <category>community</category>
    <category>mysql</category>
    <category>pbxt</category>
    <category>storage engine</category>
    <category>interview</category>
    <category>paul mccullagh</category>
  </item>

  <item>
    <title>Microsoft's embrace of MySQL could kill it</title>
    <guid isPermaLink="false">http://news.cnet.com/8301-13505_3-10402551-16.html</guid>
    <link>http://news.cnet.com/8301-13505_3-10402551-16.html?part=rss&amp;amp;tag=feed&amp;amp;subj=TheOpenRoad</link>
    <description>Microsoft is now offering support for MySQL, which should give pause to every open-source company that expects to make money through support subscriptions.</description>
    <content:encoded><![CDATA[Microsoft is now offering support for MySQL, which should give pause to every open-source company that expects to make money through support subscriptions.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22334&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22334&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 19:01:23 +0000</pubDate>
    <dc:creator>Matt Asay</dc:creator>
  </item>

  <item>
    <title>Crouching dolphin, hidden bugs.</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-27751205.post-6324963863801127118</guid>
    <link>http://antbits.blogspot.com/2009/11/crouching-dolphin-hidden-bugs.html</link>
    <description>I hate it when the changelog of any MySQL release references bugs which when clicked, simply says &amp;quot;You do not have access to bug&amp;quot;.</description>
    <content:encoded><![CDATA[I hate it when the changelog of any MySQL release references bugs which when clicked, simply says &quot;You do not have access to bug&quot;.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22332&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22332&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 17:54:31 +0000</pubDate>
    <dc:creator>Antony T Curtis</dc:creator>
    <category>sun</category>
    <category>mysql</category>
  </item>

  <item>
    <title>Open source and the cloud - the quick and the dead</title>
    <guid isPermaLink="false">http://blogs.the451group.com/opensource/?p=1286</guid>
    <link>http://feedproxy.google.com/~r/451opensource/~3/gTQD05XtM-U/</link>
    <description>Savio Rodrigues has published a post arguing that cloud platforms such as Amazon Web Services and Microsoft&amp;#8217;s Azure pose a threat to the monetization of open source by specialist vendors.
Savio makes a good case based on the recent launch of AWS&amp;#8217;s Relational Database Service, based on MySQL, and Microsoft&amp;#8217;s support for MySQL and Tomcat on Azure:


&amp;#8220;When Amazon decided to offer MySQL via Amazon RDS, they did so without purchasing MySQL support from Sun.  I’ve confirmed that Microsoft Azure is supporting MySQL on Azure without paying Sun for a MySQL Enterprise subscription.&amp;#8221;

Clearly there is a threat to open source vendors from cloud-based services. Meanwhile I have previous argued that the cloud and open source are complementary. Can both positions be valid?
I believe so, and I think it&amp;#8217;s important to look at the technologies involved. Certainly, the ability of cloud platform providers to provide services based on infrastructure components such as MySQL and Tomcat threatens potential support revenues for on-premise deployments, but SugarCRM&amp;#8217;s launch of CRM Applications on Windows Azure proves that just because the code is open source, does not mean that the cloud platform provider will automatically cut the vendor out of the picture.
Perhaps the difference with SugarCRM is that it is application, rather than infrastructure. Perhaps it is also the fact that SugarCRM has been proactive about exploring on-demand and cloud delivery models.
One of the reasons AWS was able to deliver the a managed MySQL service on EC2 was, frankly, because Sun had not already done so. All the realtional database vendors made their products available as AMIs on AWS in 2008 and since then they have done almost nothing about innovating delivery options abound those AMIs. 
Had Sun launched MySQL-as-a-service on EC2 it could have grabbed the market share that AWS will now grab with RDS. I&amp;#8217;m not sure why Sun failed to do this, incidentally. FathomDB did it, although it lacked the market presence to prevent AWS stealing the limelight. I would argue that Sun/MySQL could have done so.
Savio argues that open source specialists faced with this dilemma should double-down on their investments in &amp;#8220;proprietary features in the &amp;#8216;enterprise version of the open source product, which are note available in the &amp;#8216;free community&amp;#8217; version&amp;#8221;. 
Certainly that is one opportunity for differentiation, but I would also argue that open source specialist vendors should also be concentrating on working with cloud platform providers to bring managed service deployments to market before the platform providers beat them to it.
I think in the long-term we&amp;#8217;ll see more vendors providing open source software for on-premise deployment while offering enterprise versions via paid managed service deployments on cloud platforms, along with services to help customers migrate their data/applications from one deployment option to the other.
And if you&amp;#8217;re wondering why a cloud provider would bother working with an open source specialist vendor, rather than just taking their code, consider this: one of the cloud providers mentioned in this post pays for enterprise Linux support subscriptions rather than using a community Linux or supporting its Linux servers internally. And it isn&amp;#8217;t Microsoft.
Cloud computing is undeniably a threat to the monetization of open source software, but it is also an opportunity. Be quick or be dead.
</description>
    <content:encoded><![CDATA[<p>Savio Rodrigues has published a <a href="http://saviorodrigues.wordpress.com/2009/11/19/microsoft-azure-to-capture-open-source-revenue-streams/">post</a> arguing that cloud platforms such as Amazon Web Services and Microsoft&#8217;s Azure pose a threat to the monetization of open source by specialist vendors.</p>
<p>Savio makes a good case based on the recent launch of AWS&#8217;s Relational Database Service, based on MySQL, and Microsoft&#8217;s support for MySQL and Tomcat on Azure:</p>
<ul>
<blockquote><p>
&#8220;When Amazon decided to offer MySQL via Amazon RDS, they did so without purchasing MySQL support from Sun.  I’ve confirmed that Microsoft Azure is supporting MySQL on Azure without paying Sun for a MySQL Enterprise subscription.&#8221;</p></blockquote>
</ul>
<p>Clearly there is a threat to open source vendors from cloud-based services. Meanwhile I have previous <a href="http://blogs.the451group.com/opensource/2009/07/30/open-source-as-an-on-ramp-to-the-cloud/">argued</a> that the cloud and open source are complementary. Can both positions be valid?</p>
<p>I believe so, and I think it&#8217;s important to look at the technologies involved. Certainly, the ability of cloud platform providers to provide services based on infrastructure components such as MySQL and Tomcat threatens potential support revenues for on-premise deployments, but SugarCRM&#8217;s <a href="http://www.businesswire.com/portal/site/home/permalink/?ndmViewId=news_view&amp;newsId=20091117006494&amp;newsLang=en">launch</a> of CRM Applications on Windows Azure proves that just because the code is open source, does not mean that the cloud platform provider will automatically cut the vendor out of the picture.</p>
<p>Perhaps the difference with SugarCRM is that it is application, rather than infrastructure. Perhaps it is also the fact that SugarCRM has been proactive about exploring on-demand and cloud delivery models.</p>
<p>One of the reasons AWS was able to deliver the a managed MySQL service on EC2 was, frankly, because Sun had not already done so. All the realtional database vendors made their products available as AMIs on AWS in 2008 and since then they have done almost nothing about innovating delivery options abound those AMIs. </p>
<p>Had Sun launched MySQL-as-a-service on EC2 it could have grabbed the market share that AWS will now grab with RDS. I&#8217;m not sure why Sun failed to do this, incidentally. FathomDB <a href="http://fathomdb.com/about/home">did it</a>, although it lacked the market presence to prevent AWS stealing the limelight. I would argue that Sun/MySQL could have done so.</p>
<p>Savio argues that open source specialists faced with this dilemma should double-down on their investments in &#8220;proprietary features in the &#8216;enterprise version of the open source product, which are note available in the &#8216;free community&#8217; version&#8221;. </p>
<p>Certainly that is one opportunity for differentiation, but I would also argue that open source specialist vendors should also be concentrating on working with cloud platform providers to bring managed service deployments to market before the platform providers beat them to it.</p>
<p>I think in the long-term we&#8217;ll see more vendors providing open source software for on-premise deployment while offering enterprise versions via paid managed service deployments on cloud platforms, along with services to help customers migrate their data/applications from one deployment option to the other.</p>
<p>And if you&#8217;re wondering why a cloud provider would bother working with an open source specialist vendor, rather than just taking their code, consider this: one of the cloud providers mentioned in this post pays for enterprise Linux support subscriptions rather than using a community Linux or supporting its Linux servers internally. And it isn&#8217;t Microsoft.</p>
<p>Cloud computing is undeniably a threat to the monetization of open source software, but it is also an opportunity. Be quick or be dead.</p>
<img src="http://feeds.feedburner.com/~r/451opensource/~4/gTQD05XtM-U" height="1" width="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22331&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22331&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 17:49:31 +0000</pubDate>
    <dc:creator>The 451 Group</dc:creator>
    <category>Licensing</category>
    <category>Linux</category>
    <category>Software</category>
    <category>451 group</category>
    <category>451caostheory</category>
    <category>451group</category>
    <category>amazon</category>
    <category>AWS</category>
    <category>Azure</category>
    <category>caostheory</category>
    <category>cloud</category>
    <category>matt aslett</category>
    <category>mattaslett</category>
    <category>matthew aslett</category>
    <category>matthewaslett</category>
    <category>Microsoft</category>
    <category>open-source</category>
    <category>opensource</category>
    <category>Red Hat</category>
    <category>relational database service</category>
    <category>sugarcrm</category>
    <category>The 451 Group</category>
    <category>the451group</category>
    <category>tomcat</category>
  </item>

  <item>
    <title>Log Buffer #170: a Carnival of the Vanities for DBAs</title>
    <guid isPermaLink="false">http://www.pythian.com/news/?p=5567</guid>
    <link>http://www.pythian.com/news/5567/log-buffer-170-a-carnival-of-the-vanities-for-dbas/</link>
    <description>This is the 170th edition of Log Buffer, the weekly review of database blogs. Welcome. Let&amp;#8217;s kick off this week with a double-helping of&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;
SQL Server
There are lots of good technical posts this week.  The SSIS Junkie has some observations and a straw poll on sort transform arbitration. He writes, &amp;#8220;This post was prompted by a thread on the MSDN SSIS forum today where the poster was asking how he could replicate the behaviour of SSIS’s Sort transform using T-SQL, specifically he wanted to know how the Sort transform chooses what data to pass through when the &amp;#8216;Remove Duplicates&amp;#8217; option is checked.&amp;#8221;
Another poll, courtesy of Tibor Karaszi: do you perform log backup for the model database?
Eric Johnson has a lesson in looping through rows in a table in SSIS 2008, which begins, &amp;#8220;When writing code against a SQL Server, as we usually are doing in SSIS Packages, you often need to iterate over all the rows in a table. This can be done using an SSIS Foreach Loop Container, but the how is not obvious.&amp;#8221;
Simple-Talk&amp;#8217;s Tony Davis wonders, Do Scalar UDFs give SQL Server a Bad Name? &amp;#8220;Many developers seem to regard SQL Server as if it were a science-fiction alien planet where unsuspecting crew-members in blue jumpers occasionally die horribly; everything is suddenly unsafe, and potentially malicious: nothing really works properly and so any serious code should be kept well away from it. Is this developer ignorance, or is their fear justified?&amp;#8221;
From Merrill Aldrich comes a trick question  &amp;#8212; part quattro. Spoiler: TPH is an evil trap.  As a commenter says: &amp;#8220;Very interesting, I&amp;#8217;ve never heard this vehement an argument against TPH before.&amp;#8221;

Thinking outside the box lets us in on how to tell if you are running on a virtual environment, with a handy little bit of code.
Kalen Delaney elucidates UPDATE Locks, &amp;#8220;&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;a hybrid of SHARED and EXCLUSIVE locks. [Contrary] to what you might think, UPDATE locks are not just acquired for UPDATE operations.&amp;#8221;
Stephen Forte shows how SQL Server R2 Does SQL Azure.  
Now that PASS 2009 in Seattle, Washington has passed, it&amp;#8217;s time to fondly look back on it. Kendal Van Dyke shares his experiences and some photos in Looking Back – PASS Summit 2009 Day 4.
The Rambling DBA, Jonathan Kehayias does so with the benefits of attending PASS realized: &amp;#8220;&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;as a testament to the value of attending this conference the very first session I attended, diagnosed and provided information for a problem that has existed in one of my servers for many weeks but was impossible to diagnose unless you knew what you were looking at.&amp;#8221;
Thomas LaRock, SQL Rockstar concurs: &amp;#8220;If you want to grow your skills, then you need to connect, learn, and share with others. And there is no better place to do that than at PASS.&amp;#8221;
Not that PASS was the only game in town. Just down the coast a bit, Baron Schwartz gives his recap of Portland OpenSQL Camp 2009.
Selena Marie Deckelmann reports that OpenSQLCamp was awesome!
PostgreSQL
Pavel Stehule has some news of a longtime plpgsql misfeature removed. He writes, &amp;#8220;plpgsql is good language &amp;#8211; simple, robust with good error diagnostic. But it had one bizarre behave. plpgsql connects two worlds &amp;#8211; procedural ADA like code and SQL statements. Usually there are not problems. But there are one exception &amp;#8211; collision of identifiers.&amp;#8221;
In the latest in his Waiting for 8.5 series, Hubert Lubacziewski introduces and tests something new: TRIGGERS on columns.
MySQL
On code.openark.org, Shlomi Noach is surprised by questions or queries. He writes, &amp;#8220;I was used to checking for the &amp;#8216;questions&amp;#8217; global status variables&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp; So, for example, I could run com_select/questions to learn the SELECT ratio out of all queries. &amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp; Apparently, as of 5.0.72-5.0.76 &amp;#038; 5.1.31 this has changed. A new status variable was introduced, called &amp;#8216;queries&amp;#8217;.&amp;#8221;  What&amp;#8217;s the difference? Is this good or bad?  Shlomi and his readers kick it around.
Venu Anuganti also was surprised, in his case by InnoDB Tablespace Corruption: &amp;#8220;When&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;InnoDB crashes, it automatically recovers during the next start by rolling back/forward based on what was pending and un-flushed/un-committed changes at the time of crash. &amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;  [On] one of the servers; we ran out of disk space&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;on data directory&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;and server was running for few hours in this mode&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp; [It] became un-available and not responding after a while. Only option left was to kill the server process and its PID along with cleaning the stuff to get the space back. After I (re)started the server&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp; the tablespace is corrupted.&amp;#8221;
From Arnold Daniels comes a version of versioning MySQL data, which Arnold introduces thus: &amp;#8220;&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;You’re probably using a versioning control system&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;to safeguard your data. Advantages of using a VCS are that you can walk to the individual changes for a document, see who made each change and revert back to specific revision if needed. These are features which would also be nice for data stored in a database. With the use of triggers we can implement versioning for data stored in a MySQL db.&amp;#8221; Example code follows.
On the MySQL Perfomance Blog, Morgan Tocker qualifies his earlier piece on why you don’t want to shard: &amp;#8220;What I didn’t mention was that if you’ve established that you will need to eventually shard, is it better to just get it out of the way early?  My answer is almost always no. That is to say I disagree with a statement I’ve been hearing recently; &amp;#8217;shard early, shard often&amp;#8217;&amp;#8221;
Morgan also mentions that interviews for InfiniDB and TokuDB are next: &amp;#8220;I’d like to announce that Robert Dempsey (InfiniDB storage engine) and Bradley C. Kuszmaul (TokuDB storage engine) have also accepted an interview. If you have any questions about either storage engine, please post them here by Friday 20th November.&amp;#8221;
Here&amp;#8217;s a new blog to watch, particularly if you&amp;#8217;re new to MySQL or Drizzle: Kent Bozlinski&amp;#8217;s Learning Drizzle.  Kent says, &amp;#8220;I’m not really scared of rain after living in Seattle for seven years. I am a little scared of sticking my neck out and writing about something which (for the moment) I know almost nothing about.&amp;#8221; The post is Drizzle is Scary (A Little).
Oracle
Maybe you&amp;#8217;ve already heard about the fabulous unpopularity of the new My Oracle Support. Daniel Fink comes back with some data and commentary on just that, with his My Oracle Support Survey Results. 
Richard Foote asks, An index only performs how much work???, the result of looking into exactly why index rebuilds can improve performance so significantly.
Kerry Osborne gives a lesson on fixing bad index hints in SQL Profiles (automatically).  He says, &amp;#8220;With 10g and 11g, it appears the goal [or Outlines] has swung away from the “locking” concept and towards allowing the optimizer more flexibility. &amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;I must say that I find this decision to be irritating at best. &amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp; One of the main offenders in this regard is the use of a new format available for index hints as of 10g.&amp;#8221;
Inside the Oracle Optimizer covers similar turf in answering to the question, What should I do with old hints in my workload?, or more specifically, &amp;#8220;When moving from 10g to 11g, should hints in existing SQL be removed?&amp;#8221;
Tom Kyte wants your opinions on comparative window functions: &amp;#8220;&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;they could be getting better in the near future. &amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;analytics [could be allowed] to access the current row value to be compared against any other row value in a defined window. &amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp; I&amp;#8217;ve already supplied them with my feedback (which started with &amp;#8220;this is an awesome idea&amp;#8221;) &amp;#8211; and you can too &amp;#8211; by posting it here. They&amp;#8217;ll be checking back to see what you say.&amp;#8221;
If you like staying on top of fresh things, perhaps John Piwowar&amp;#8217;s method of retrieving Oracle patches with wget would also appeal to you.
And that is all for now. If you think I&amp;#8217;ve missed a worthwhile DB blog from this week, please mention it in a comment.
Log Buffer will be back in a week&amp;#8217;s time.  See you then!</description>
    <content:encoded><![CDATA[<p>This is the 170<sup>th</sup> edition of <a href="http://www.pythian.com/news/about-log-buffer"><em>Log Buffer</em></a>, the weekly review of database blogs. Welcome. Let&#8217;s kick off this week with a double-helping of&nbsp;.&nbsp;.&nbsp;.&nbsp;</p>
<h3>SQL Server</h3>
<p>There are lots of good technical posts this week.  <a href="http://sqlblog.com/blogs/jamie_thomson">The SSIS Junkie</a> has some observations and a straw poll on <a href="http://sqlblog.com/blogs/jamie_thomson/archive/2009/11/12/sort-transform-arbitration-ssis.aspx">sort transform arbitration</a>. He writes, &#8220;This post was prompted by a thread on the MSDN SSIS forum today where the poster was asking how he could replicate the behaviour of SSIS’s Sort transform using T-SQL, specifically he wanted to know how the Sort transform chooses what data to pass through when the &#8216;Remove Duplicates&#8217; option is checked.&#8221;</p>
<p>Another poll, courtesy of <a href="http://sqlblog.com/blogs/tibor_karaszi"><strong>Tibor Karaszi</strong></a>: <a href="http://sqlblog.com/blogs/tibor_karaszi/archive/2009/11/18/do-you-perform-log-backup-for-the-model-database.aspx">do you perform log backup for the model database?</a></p>
<p><a href="http://sqlblog.com/blogs/eric_johnson"><strong>Eric Johnson</strong></a> has a lesson in <a href="http://sqlblog.com/blogs/eric_johnson/archive/2009/11/13/ssis-2008-looping-through-rows-in-a-table.aspx">looping through rows in a table in SSIS 2008</a>, which begins, &#8220;When writing code against a SQL Server, as we usually are doing in SSIS Packages, you often need to iterate over all the rows in a table. This can be done using an SSIS Foreach Loop Container, but the how is not obvious.&#8221;</p>
<p><a href="http://www.simple-talk.com/community/blogs/tony_davis">Simple-Talk&#8217;s <strong>Tony Davis</strong></a> wonders, <a href="http://www.simple-talk.com/community/blogs/tony_davis/archive/2009/11/13/76413.aspx">Do Scalar UDFs give SQL Server a Bad Name?</a> &#8220;Many developers seem to regard SQL Server as if it were a science-fiction alien planet where unsuspecting crew-members in blue jumpers occasionally die horribly; everything is suddenly unsafe, and potentially malicious: nothing really works properly and so any serious code should be kept well away from it. Is this developer ignorance, or is their fear justified?&#8221;</p>
<p>From <a href="http://sqlblog.com/blogs/merrill_aldrich"><strong>Merrill Aldrich</strong></a> comes a <a href="http://sqlblog.com/blogs/merrill_aldrich/archive/2009/11/17/trick-question-part-quattro.aspx">trick question  &#8212; part quattro</a>. Spoiler: TPH is an evil trap.  As a commenter says: &#8220;Very interesting, I&#8217;ve never heard this vehement an argument against TPH before.&#8221;</p>
<p><span></span></p>
<p><a href="http://weblogs.sqlteam.com/peterl">Thinking outside the box</a> lets us in on <a href="http://weblogs.sqlteam.com/peterl/archive/2009/11/12/How-to-tell-if-you-are-running-in-a-virtual.aspx">how to tell if you are running on a virtual environment</a>, with a handy little bit of code.</p>
<p><a href="http://sqlblog.com/blogs/kalen_delaney"><strong>Kalen Delaney</strong></a> elucidates <a href="http://sqlblog.com/blogs/kalen_delaney/archive/2009/11/13/update-locks.aspx">UPDATE Locks</a>, &#8220;&nbsp;.&nbsp;.&nbsp;.&nbsp;a hybrid of SHARED and EXCLUSIVE locks. [Contrary] to what you might think, UPDATE locks are not just acquired for UPDATE operations.&#8221;</p>
<p><a href="http://www.stephenforte.net"><strong>Stephen Forte</strong></a> shows how <a href="http://www.stephenforte.net/PermaLink,guid,5e0d935e-694d-4532-9c2f-610aa45039fa.aspx">SQL Server R2 Does SQL Azure</a>.  </p>
<p>Now that <strong>PASS 2009</strong> in Seattle, Washington has passed, it&#8217;s time to fondly look back on it. <a href="http://kendalvandyke.blogspot.com"><strong>Kendal Van Dyke</strong></a> shares his experiences and some photos in <a href="http://kendalvandyke.blogspot.com/2009/11/looking-back-pass-summit-2009-day-4.html">Looking Back – PASS Summit 2009 Day 4</a>.</p>
<p><a href="http://sqlblog.com/blogs/jonathan_kehayias"><strong>The Rambling DBA</strong></a>, <strong>Jonathan Kehayias</strong> does so with <a href="http://sqlblog.com/blogs/jonathan_kehayias/archive/2009/11/12/the-benefits-of-attending-pass-realized.aspx">the benefits of attending PASS realized</a>: &#8220;&nbsp;.&nbsp;.&nbsp;.&nbsp;as a testament to the value of attending this conference the very first session I attended, diagnosed and provided information for a problem that has existed in one of my servers for many weeks but was impossible to diagnose unless you knew what you were looking at.&#8221;</p>
<p><strong>Thomas LaRock</strong>, <a href="http://thomaslarock.com">SQL Rockstar</a> concurs: <a href="http://thomaslarock.com/2009/11/the-highlander">&#8220;If you want to grow your skills, then you need to connect, learn, and share with others. And there is no better place to do that than at PASS.&#8221;</a></p>
<p>Not that PASS was the only game in town. Just down the coast a bit, <a href="http://www.xaprb.com/blog"><strong>Baron Schwartz</strong></a> gives his <a href="http://www.xaprb.com/blog/2009/11/17/recap-of-portland-opensql-camp-2009/">recap of Portland OpenSQL Camp 2009</a>.</p>
<p><a href="http://www.chesnok.com/daily"><strong>Selena Marie Deckelmann</strong></a> reports that <a href="http://www.chesnok.com/daily/2009/11/16/opensqlcamp-was-awesome">OpenSQLCamp was awesome!</a></p>
<h3>PostgreSQL</h3>
<p><a href="http://okbob.blogspot.com"><strong>Pavel Stehule</strong></a> has some news of <a href="http://okbob.blogspot.com/2009/11/longtime-plpgsql-misfeature-removed.html">a longtime plpgsql misfeature removed</a>. He writes, &#8220;plpgsql is good language &#8211; simple, robust with good error diagnostic. But it had one bizarre behave. plpgsql connects two worlds &#8211; procedural ADA like code and SQL statements. Usually there are not problems. But there are one exception &#8211; collision of identifiers.&#8221;</p>
<p>In the latest in his <a href="http://www.depesz.com/index.php/tag/pg85/"><em>Waiting for 8.5</em></a> series, <a href="http://www.depesz.com"><strong>Hubert Lubacziewski</strong></a> introduces and tests something new: <a href="http://www.depesz.com/index.php/2009/11/18/waiting-for-8-5-triggers-on-columns">TRIGGERS on columns</a>.</p>
<h3>MySQL</h3>
<p>On <a href="http://code.openark.org/blog">code.openark.org</a>, <strong>Shlomi Noach</strong> is surprised by <a href="http://code.openark.org/blog/mysql/questions-or-queries">questions or queries</a>. He writes, &#8220;I was used to checking for the &#8216;questions&#8217; global status variables&nbsp;.&nbsp;.&nbsp;.&nbsp; So, for example, I could run com_select/questions to learn the SELECT ratio out of all queries. &nbsp;.&nbsp;.&nbsp;.&nbsp; Apparently, as of 5.0.72-5.0.76 &#038; 5.1.31 this has changed. A new status variable was introduced, called &#8216;queries&#8217;.&#8221;  What&#8217;s the difference? Is this good or bad?  Shlomi and his readers kick it around.</p>
<p><a href="http://venublog.com"><strong>Venu Anuganti</strong></a> also was surprised, in his case by <a href="http://venublog.com/2009/11/17/innodb-tablespace-corruption">InnoDB Tablespace Corruption</a>: &#8220;When&nbsp;.&nbsp;.&nbsp;.&nbsp;InnoDB crashes, it automatically recovers during the next start by rolling back/forward based on what was pending and un-flushed/un-committed changes at the time of crash. &nbsp;.&nbsp;.&nbsp;.&nbsp;  [On] one of the servers; we ran out of disk space&nbsp;.&nbsp;.&nbsp;.&nbsp;on data directory&nbsp;.&nbsp;.&nbsp;.&nbsp;and server was running for few hours in this mode&nbsp;.&nbsp;.&nbsp;.&nbsp; [It] became un-available and not responding after a while. Only option left was to kill the server process and its PID along with cleaning the stuff to get the space back. After I (re)started the server&nbsp;.&nbsp;.&nbsp;.&nbsp; the tablespace is corrupted.&#8221;</p>
<p>From <a href="http://www.adaniels.nl/articles"><strong>Arnold Daniels</strong></a> comes a version of <a href="http://www.adaniels.nl/articles/versioning-mysql-data">versioning MySQL data</a>, which Arnold introduces thus: &#8220;&nbsp;.&nbsp;.&nbsp;.&nbsp;You’re probably using a versioning control system&nbsp;.&nbsp;.&nbsp;.&nbsp;to safeguard your data. Advantages of using a VCS are that you can walk to the individual changes for a document, see who made each change and revert back to specific revision if needed. These are features which would also be nice for data stored in a database. With the use of triggers we can implement versioning for data stored in a MySQL db.&#8221; Example code follows.</p>
<p>On <a href="http://www.mysqlperformanceblog.com">the MySQL Perfomance Blog</a>, <strong>Morgan Tocker</strong> qualifies his earlier piece on why you don’t want to shard: &#8220;What I didn’t mention was that if you’ve established that you will need to eventually shard, is it better to just get it out of the way early?  My answer is almost always no. That is to say I disagree with a statement I’ve been hearing recently; <a href="http://www.mysqlperformanceblog.com/2009/11/16/shard-early-shard-often">&#8217;shard early, shard often&#8217;</a>&#8221;</p>
<p>Morgan also mentions that <a href="http://www.mysqlperformanceblog.com/2009/11/16/interviews-for-infinidb-and-tokudb-are-next">interviews for InfiniDB and TokuDB are next</a>: &#8220;I’d like to announce that <strong>Robert Dempsey</strong> (InfiniDB storage engine) and <strong>Bradley C. Kuszmaul</strong> (TokuDB storage engine) have also accepted an interview. If you have any questions about either storage engine, please post them here by Friday 20th November.&#8221;</p>
<p>Here&#8217;s a new blog to watch, particularly if you&#8217;re new to MySQL or Drizzle: <strong>Kent Bozlinski&#8217;s</strong> <a href="http://www.learningdrizzle.com">Learning Drizzle</a>.  Kent says, &#8220;I’m not really scared of rain after living in Seattle for seven years. I am a little scared of sticking my neck out and writing about something which (for the moment) I know almost nothing about.&#8221; The post is <a href="http://www.learningdrizzle.com/?p=3">Drizzle is Scary (A Little)</a>.</p>
<h3>Oracle</h3>
<p>Maybe you&#8217;ve already heard about the fabulous unpopularity of the new My Oracle Support. <a href="http://optimaldba.blogspot.com"><strong>Daniel Fink</strong></a> comes back with some data and commentary on just that, with his <a href="http://optimaldba.blogspot.com/2009/11/my-oracle-support-survey-results.html">My Oracle Support Survey Results</a>. </p>
<p><a href="http://richardfoote.wordpress.com"><strong>Richard Foote</strong></a> asks, <a href="http://richardfoote.wordpress.com/2009/11/12/1094">An index only performs how much work???</a>, the result of looking into exactly why index rebuilds can improve performance so significantly.</p>
<p><a href="http://kerryosborne.oracle-guy.com"><strong>Kerry Osborne</strong></a> gives a lesson on <a href="http://kerryosborne.oracle-guy.com/2009/11/fixing-bad-index-hints-in-sql-profiles-automatically">fixing bad index hints in SQL Profiles (automatically)</a>.  He says, &#8220;With 10g and 11g, it appears the goal [or Outlines] has swung away from the “locking” concept and towards allowing the optimizer more flexibility. &nbsp;.&nbsp;.&nbsp;.&nbsp;I must say that I find this decision to be irritating at best. &nbsp;.&nbsp;.&nbsp;.&nbsp; One of the main offenders in this regard is the use of a new format available for index hints as of 10g.&#8221;</p>
<p><a href="http://optimizermagic.blogspot.com">Inside the Oracle Optimizer</a> covers similar turf in answering to the question, <a href="http://optimizermagic.blogspot.com/2009/11/what-should-i-do-with-old-hints-in-my.html">What should I do with old hints in my workload?</a>, or more specifically, &#8220;When moving from 10g to 11g, should hints in existing SQL be removed?&#8221;</p>
<p><a href="http://tkyte.blogspot.com"><strong>Tom Kyte</strong></a> wants your opinions on <a href="http://tkyte.blogspot.com/2009/11/comparative-window-functions.html">comparative window functions</a>: &#8220;&nbsp;.&nbsp;.&nbsp;.&nbsp;they could be getting better in the near future. &nbsp;.&nbsp;.&nbsp;.&nbsp;analytics [could be allowed] to access the current row value to be compared against any other row value in a defined window. &nbsp;.&nbsp;.&nbsp;.&nbsp; I&#8217;ve already supplied them with my feedback (which started with &#8220;this is an awesome idea&#8221;) &#8211; and you can too &#8211; by posting it here. They&#8217;ll be checking back to see what you say.&#8221;</p>
<p>If you like staying on top of fresh things, perhaps <a href="http://only4left.jpiwowar.com"><strong>John Piwowar&#8217;s</strong></a> method of <a href="http://only4left.jpiwowar.com/2009/02/retrieving-oracle-patches-with-wget">retrieving Oracle patches with wget</a> would also appeal to you.</p>
<p>And that is all for now. If you think I&#8217;ve missed a worthwhile DB blog from this week, please mention it in a comment.</p>
<p><em>Log Buffer</em> will be back in a week&#8217;s time.  See you then!</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22330&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22330&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 17:44:45 +0000</pubDate>
    <dc:creator>Dave Edwards</dc:creator>
    <category>Log Buffer</category>
    <category>MySQL</category>
    <category>Oracle</category>
    <category>PostgreSQL</category>
    <category>SQL Server</category>
    <category>Technical Blog</category>
  </item>

  <item>
    <title>451 CAOS Links 2009.11.20</title>
    <guid isPermaLink="false">http://blogs.the451group.com/opensource/?p=1285</guid>
    <link>http://feedproxy.google.com/~r/451opensource/~3/1piHbp2ei8Y/</link>
    <description>Google launches Chromium project, Terracotta acquires Quartz. And more.
Follow 451 CAOS Links live @caostheory on Twitter and Identi.ca
&amp;#8220;Tracking the open source news wires, so you don&amp;#8217;t have to.&amp;#8221;
For the latest on Oracle&amp;#8217;s acquisition of MySQL via Sun, see Everything you always wanted to know about MySQL but were afraid to ask
# Google launched the Chromium OS open source project, a prelude to the Chrome OS, while Canonical confirmed that it is contributing to the development of Chrome OS. 
# Terracotta acquired the Quartz open source job scheduling and workload management software project. 
# The European Commission extended its Oracle/Sun review deadline until Jan 27 at the request of Oracle
# Mozilla revealed its 2008 revenue was $78.6m, up 5%. Expenses were $49.4m, up 48%. 
# Roberto Galoppini wrote about open source value creation and consumption.  
# Exadel and Actuate formed a strategic alliance to promote the use of BIRT in enterprise applications. 
# Savio Rodrigues explained how Microsoft Azure, like Amazon&amp;#8217;s Web Services, will capture open source revenue streams. 
# MuleSoft released Mule Data Integrator for data mapping and transformation.
# MindTouch launched a version of its collaboration platform for the cloud. 
# Tristan Renaud, on software pricing, asked to hide or not to hide? 
# Mik Kersten published growing open source ecosystems: the install story.  
# CodePlex Foundation announced its first gallery/project - The ASP.NET Ajax Library.
# Zenoss released version 2.5 of its commercially licensed Zenoss Enterprise product. 
# ActiveState launched Firefly, a hosted project management and collaboration offering based on Trac. 
# Opengear released Opengear Monitor, a new centralized monitoring system based on Nagios. 
# Infobright and Talend teamed up with Jaspersoft for open source data warehousing/integration/BI appliances.
# WaveMaker launched WaveMaker 6.0, pitching it as an open source cloud development platform. 
# Vyatta partnered with OpenVPN on an auto-configuring VPN offering for branch offices and remote workers. 
# Matt Asay explained why pro-open source policies do not always mean more open source. 
# Microsoft announced Windows Azure Tools for Eclipse and SDKs for PHP and Java. 
# The European Space Agency (ESA) wants to build a repository for hosting and developing it&amp;#8217;s open source applications. 
# SugarCRM announced its CRM Applications will available be on Windows Azure.
# Linux.com published an interview with Tim Golden, Open Source Software Infrastructure Strategist at Bank of America.
# Roman Stanek raised the issue of openness in commercial open source software pricing.
# Tarus Balog raised some interesting questions about Zenoss Core/Enterprise licensing.
</description>
    <content:encoded><![CDATA[<p>Google launches Chromium project, Terracotta acquires Quartz. And more.</p>
<p>Follow 451 CAOS Links live @caostheory on <a href="http://twitter.com/caostheory">Twitter</a> and <a href="http://identi.ca/caostheory">Identi.ca</a><br />
<em>&#8220;Tracking the open source news wires, so you don&#8217;t have to.&#8221;</em></p>
<p>For the latest on Oracle&#8217;s acquisition of MySQL via Sun, see <a href="http://blogs.the451group.com/opensource/2009/11/12/everything-you-always-wanted-to-know-about-mysql-but-were-afraid-to-ask-part-two/">Everything you always wanted to know about MySQL but were afraid to ask</a></p>
<p># Google <a href="http://bit.ly/2CvFwX">launched</a> the Chromium OS open source project, a prelude to the Chrome OS, while Canonical <a href="http://bit.ly/4q819t">confirmed</a> that it is contributing to the development of Chrome OS. </p>
<p># Terracotta <a href="http://bit.ly/WRTEJ">acquired</a> the Quartz open source job scheduling and workload management software project. </p>
<p># The European Commission <a href="http://bit.ly/19vDMA">extended</a> its Oracle/Sun review deadline until Jan 27 at the request of Oracle</p>
<p># Mozilla <a href="http://bit.ly/2DevcL">revealed</a> its 2008 revenue was $78.6m, up 5%. Expenses were $49.4m, up 48%. </p>
<p># Roberto Galoppini <a href="http://bit.ly/4oVqIf">wrote</a> about open source value creation and consumption.  </p>
<p># Exadel and Actuate <a href="http://bit.ly/22SLtY">formed</a> a strategic alliance to promote the use of BIRT in enterprise applications. </p>
<p># Savio Rodrigues <a href="http://bit.ly/4pRYBX">explained</a> how Microsoft Azure, like Amazon&#8217;s Web Services, will capture open source revenue streams. </p>
<p># MuleSoft <a href="http://bit.ly/2r95xc">released</a> Mule Data Integrator for data mapping and transformation.</p>
<p># MindTouch <a href="http://bit.ly/11mUHk">launched</a> a version of its collaboration platform for the cloud. </p>
<p># Tristan Renaud, on software pricing, <a href="http://bit.ly/41PpWs">asked</a> to hide or not to hide? </p>
<p># Mik Kersten <a href="http://bit.ly/3dH0eT">published</a> growing open source ecosystems: the install story.  </p>
<p># CodePlex Foundation <a href="http://bit.ly/2Qnakm">announced</a> its first gallery/project - The ASP.NET Ajax Library.</p>
<p># Zenoss <a href="http://bit.ly/2FhK7A">released</a> version 2.5 of its commercially licensed Zenoss Enterprise product. </p>
<p># ActiveState <a href="http://bit.ly/34f1DT">launched</a> Firefly, a hosted project management and collaboration offering based on Trac. </p>
<p># Opengear <a href="http://bit.ly/1Q7Mk8">released</a> Opengear Monitor, a new centralized monitoring system based on Nagios. </p>
<p># Infobright and Talend <a href="http://bit.ly/1lAV9b">teamed</a> up with Jaspersoft for open source data warehousing/integration/BI appliances.</p>
<p># WaveMaker <a href="http://bit.ly/44yBlj">launched</a> WaveMaker 6.0, pitching it as an open source cloud development platform. </p>
<p># Vyatta <a href="http://bit.ly/1szCbD">partnered</a> with OpenVPN on an auto-configuring VPN offering for branch offices and remote workers. </p>
<p># Matt Asay <a href="http://bit.ly/20krxW">explained</a> why pro-open source policies do not always mean more open source. </p>
<p># Microsoft <a href="http://bit.ly/1rgbWG">announced</a> Windows Azure Tools for Eclipse and SDKs for PHP and Java. </p>
<p># The European Space Agency (ESA) <a href="http://bit.ly/3ExNGj">wants</a> to build a repository for hosting and developing it&#8217;s open source applications. </p>
<p># SugarCRM <a href="http://bit.ly/3rdCnX">announced</a> its CRM Applications will available be on Windows Azure.</p>
<p># Linux.com <a href="http://bit.ly/25wCXz">published</a> an interview with Tim Golden, Open Source Software Infrastructure Strategist at Bank of America.</p>
<p># Roman Stanek <a href="http://bit.ly/3RJTsM">raised</a> the issue of openness in commercial open source software pricing.</p>
<p># Tarus Balog <a href="http://bit.ly/pOf34">raised</a> some interesting questions about Zenoss Core/Enterprise licensing.</p>
<img src="http://feeds.feedburner.com/~r/451opensource/~4/1piHbp2ei8Y" height="1" width="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22329&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22329&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 15:23:02 +0000</pubDate>
    <dc:creator>The 451 Group</dc:creator>
    <category>Links</category>
    <category>451 group</category>
    <category>451caostheory</category>
    <category>451group</category>
    <category>activestate</category>
    <category>actuate</category>
    <category>ASP.NET Ajax Library</category>
    <category>bank of america</category>
    <category>birt</category>
    <category>caostheory</category>
    <category>chrome os</category>
    <category>chromium</category>
    <category>cloud</category>
    <category>codeplex</category>
    <category>EC</category>
    <category>eclipse</category>
    <category>European Space Agency</category>
    <category>exadel</category>
    <category>google</category>
    <category>inforbright</category>
    <category>jaspersoft</category>
    <category>Linux</category>
    <category>matt aslett</category>
    <category>mattaslett</category>
    <category>matthew as</category>
  </item>

  <item>
    <title>MySQL Performance: Conference Session @Paris</title>
    <guid isPermaLink="false">http://dimitrik.free.fr/blog/archives/11-01-2009_11-30-2009.html#99</guid>
    <link>http://dimitrik.free.fr/blog/archives/11-01-2009_11-30-2009.html#99</link>
    <description>
      I'm presenting during MySQL Performance Session in Paris which 
      will take place on 24th November in our office building - Sun Solution 
      Center, 32 rue Monceau, 75008 Paris. I did not blog about to avoid to 
      increase frustration for all people who cannot attend it.. Because even 
      we reserved for this even the biggest conference hall in the building 
      there is still not enough place to accept everybody.. As well we did not 
      expect so high interest - the first invitations were sent in priority to 
      MySQL customers, and in few days there was already no more place.. 
    
    
      So, why I'm writing now? ;-) Just because I'm pretty sure there will 
      be a second session! :-) I cannot say you date &amp;amp; place yet because 
      it'll directly depend on the number of persons willing to attend. And if 
      you have a such willing, please, right now express it by email to Olivier.Beutels(at)sun.com 
      !
    
    
      List of topics covered during Performance Session:
    
    
      
        MySQL history/development milestones
      
      
        MySQL Architecture overview
      
      
        MySQL Storage Engines overview (Pros/Cons)- MyISAM- InnoDB- 
        NDB- PBXT- XtraDB- Falcon
      
    
    
      
        MySQL Bottlenecks:- Data model/design- Multi-threaded model- 
        Storage engine- Internals- etc.
      
      
        MySQL Performance:- Solutions- Scalability- etc.
      
      
        InnoDB Performance:- Bottlenecks- Internals- Google SMP 
        patches- XtraDB- etc.
      
      
        MySQL 5.4- Improvements- Internals- I/O capacity- I/O 
        threads- Thread concurrency model- Benchmark results- etc.
      
      
        New / Incoming InnoDB improvements:- Ahead /Adaptive flushing 
        /checkpoint- Purge lag- Splitted locks- Multiple rollbacks- 
        etc.
      
      
        MySQL Performance Tuning:- Monitoring- Configuration- Best 
        practices- DTrace- ZFS- etc.
      
      
        MySQL &amp;amp; dim_STAT- mysqlSTAT- mysqlLOAD- innodbSTAT- 
        innodbIO- innodbMUTEX
      
    
    
      
    </description>
    <content:encoded><![CDATA[<p>
      <span>I'm presenting during MySQL Performance Session in Paris which 
      will take place on 24th November in our office building - Sun Solution 
      Center, 32 rue Monceau, 75008 Paris. I did not blog about to avoid to 
      increase frustration for all people who cannot attend it.. Because even 
      we reserved for this even the biggest conference hall in the building 
      there is still not enough place to accept everybody.. As well we did not 
      expect so high interest - the first invitations were sent in priority to 
      MySQL customers, and in few days there was already no more place.. </span>
    </p>
    <p>
      So, why I'm writing now? ;-) Just because I'm pretty sure <b>there will 
      be a second session!</b> :-) I cannot say you date &amp; place yet because 
      it'll directly depend on the number of persons willing to attend. And if 
      you have a such willing, please, <b>right now</b> express it by email to <u>Olivier.Beutels(at)sun.com</u> 
      !
    </p>
    <p>
      List of topics covered during Performance Session:
    </p>
    <ul>
      <li>
        MySQL history/development milestones
      </li>
      <li>
        MySQL Architecture overview
      </li>
      <li>
        MySQL Storage Engines overview (Pros/Cons)<br>- MyISAM<br>- InnoDB<br>- 
        NDB<br>- PBXT<br>- XtraDB<br>- Falcon
      </li>
    </ul>
    <ul>
      <li>
        MySQL Bottlenecks:<br>- Data model/design<br>- Multi-threaded model<br>- 
        Storage engine<br>- Internals<br>- etc.<br><br>
      </li>
      <li>
        MySQL Performance:<br>- Solutions<br>- Scalability<br>- etc.<br><br>
      </li>
      <li>
        InnoDB Performance:<br>- Bottlenecks<br>- Internals<br>- Google SMP 
        patches<br>- XtraDB<br>- etc.<br><br>
      </li>
      <li>
        MySQL 5.4<br>- Improvements<br>- Internals<br>- I/O capacity<br>- I/O 
        threads<br>- Thread concurrency model<br>- Benchmark results<br>- etc.<br><br>
      </li>
      <li>
        New / Incoming InnoDB improvements:<br>- Ahead /Adaptive flushing 
        /checkpoint<br>- Purge lag<br>- Splitted locks<br>- Multiple rollbacks<br>- 
        etc.<br><br>
      </li>
      <li>
        MySQL Performance Tuning:<br>- Monitoring<br>- Configuration<br>- Best 
        practices<br>- DTrace<br>- ZFS<br>- etc.<br><br>
      </li>
      <li>
        MySQL &amp; dim_STAT<br>- mysqlSTAT<br>- mysqlLOAD<br>- innodbSTAT<br>- 
        innodbIO<br>- innodbMUTEX
      </li>
    </ul>
    <p>
      <span><br>
</span>    </p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22325&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22325&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 10:14:32 +0000</pubDate>
    <dc:creator>Dimitri Kravtchuk</dc:creator>
    <category>MySQL</category>
    <category>Tools/ dbSTRESS</category>
  </item>

  <item>
    <title>New challenges and new location</title>
    <guid isPermaLink="false">http://mysqlgenie.com/wordpress/?p=22</guid>
    <link>http://mysqlgenie.com/wordpress/?p=22</link>
    <description>Hello again.
After I left Pythian I was looking at a couple of other places to begin working with, but finally settled on staying in the mediterranean region, however with a small relocation.
Thus, this post is now long overdue, but I am working for a spanish company called Tuenti, which is the largest social network in spain.  I am quite excited and have now settled down in Madrid, so I will be using this website in order to blog about challenges, problems, solutions and everything that comes with running a large scale deployment of MySQL.
Stay tuned for the first technical post, it&amp;#8217;s on its way already! </description>
    <content:encoded><![CDATA[<p>Hello again.</p>
<p>After I left <a href="http://www.pythian.com">Pythian</a> I was looking at a couple of other places to begin working with, but finally settled on staying in the mediterranean region, however with a small relocation.</p>
<p>Thus, this post is now long overdue, but I am working for a spanish company called <a href="http://www.tuenti.com">Tuenti</a>, which is the <a href="http://en.wikipedia.org/wiki/Tuenti">largest social network in spain</a>.  I am quite excited and have now settled down in <a href="http://en.wikipedia.org/wiki/Madrid">Madrid</a>, so I will be using this website in order to blog about challenges, problems, solutions and everything that comes with running a large scale deployment of MySQL.</p>
<p>Stay tuned for the first technical post, it&#8217;s on its way already! </p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22324&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22324&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 09:41:20 +0000</pubDate>
    <dc:creator>Nicklas Westerlund</dc:creator>
    <category>MySQL</category>
  </item>

  <item>
    <title>Partitioning as performance booster</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-14455177.post-2097422431286092032</guid>
    <link>http://mikaelronstrom.blogspot.com/2009/11/partitioning-as-performance-booster.html</link>
    <description>When I developed partitioning for MySQL the main goal wasto make it easier for MySQL users to manage large tablesby enabling them to easily add and drop partitions.It turns out that partitioning can also be used as a mannerto make MySQL more scalable. The reason is that in somecases the storage engine have internal locks per table orper index (one such example is the btr_search_latch in InnoDB).So in this case adding aPARTITION BY KEY (key_part)PARTITIONS 4to the table definition makes a very hot table into 4 tablesfrom the storage engine point of view.This would mostly be beneficial in cases where the mainoperation is primary key lookups on the table. Dividing theindexes in cases of scans can be both positive and negative.So this solution is definitely not a winner for all situations.I haven't tried this out yet myself in my benchmark suites,but I plan to make some experiments in this area. It is usablein sysbench, it's possible to use for DBT2 (have used partitioningfor DBT2 in MySQL Cluster benchmarks a lot already) and it'spossible to use in Dimitri's dbStress benchmark.</description>
    <content:encoded><![CDATA[When I developed partitioning for MySQL the main goal was<br />to make it easier for MySQL users to manage large tables<br />by enabling them to easily add and drop partitions.<br /><br />It turns out that partitioning can also be used as a manner<br />to make MySQL more scalable. The reason is that in some<br />cases the storage engine have internal locks per table or<br />per index (one such example is the btr_search_latch in InnoDB).<br /><br />So in this case adding a<br />PARTITION BY KEY (key_part)<br />PARTITIONS 4<br />to the table definition makes a very hot table into 4 tables<br />from the storage engine point of view.<br /><br />This would mostly be beneficial in cases where the main<br />operation is primary key lookups on the table. Dividing the<br />indexes in cases of scans can be both positive and negative.<br />So this solution is definitely not a winner for all situations.<br /><br />I haven't tried this out yet myself in my benchmark suites,<br />but I plan to make some experiments in this area. It is usable<br />in sysbench, it's possible to use for DBT2 (have used partitioning<br />for DBT2 in MySQL Cluster benchmarks a lot already) and it's<br />possible to use in Dimitri's dbStress benchmark.<div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/14455177-2097422431286092032?l=mikaelronstrom.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22322&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22322&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 07:23:00 +0000</pubDate>
    <dc:creator>Mikael Ronstr&amp;ouml;m</dc:creator>
  </item>

  <item>
    <title>Full automation of DBT2 test runs in benchmark scripts</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-14455177.post-149368189943814219</guid>
    <link>http://mikaelronstrom.blogspot.com/2009/11/full-automation-of-dbt2-test-runs-in.html</link>
    <description>My benchmark scripts was upgraded once more today.I fixed all issues pertaining to full automationof DBT2 runs. So now it is as easy to start aDBT2 test run as it previously was to start asysbench run. Obviously DBT2 was already earliersupported in the benchmark scripts, so what I didnow was add the final steps to make it fullyautomated. This includes also generating the DBT2load files needed to load the DBT2 database.See the download section on www.iclaustron.comfor the tarball including some description ofhow to configure sysbench and DBT2 test runs.</description>
    <content:encoded><![CDATA[My benchmark scripts was upgraded once more today.<br />I fixed all issues pertaining to full automation<br />of DBT2 runs. So now it is as easy to start a<br />DBT2 test run as it previously was to start a<br />sysbench run. Obviously DBT2 was already earlier<br />supported in the benchmark scripts, so what I did<br />now was add the final steps to make it fully<br />automated. This includes also generating the DBT2<br />load files needed to load the DBT2 database.<br /><br />See the download section on www.iclaustron.com<br />for the tarball including some description of<br />how to configure sysbench and DBT2 test runs.<div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/14455177-149368189943814219?l=mikaelronstrom.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22323&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22323&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 07:18:00 +0000</pubDate>
    <dc:creator>Mikael Ronstr&amp;ouml;m</dc:creator>
  </item>

  <item>
    <title>Flexviews 1.5.0-beta is now released at https://sourceforge.net/projects/flexviews/</title>
    <guid isPermaLink="false">http://swanhart.livejournal.com/129755.html</guid>
    <link>http://swanhart.livejournal.com/129755.html</link>
    <description>New in this release:External PHP based binary log consumer.  It wraps 'mysqlbinlog' and reads settings from an .ini file.The consumer must be running in order to refresh views and collect table change logs.MIN/MAX and COUNT(DISTINCT) are now supported, experimentally.  Many other improvements.</description>
    <content:encoded><![CDATA[New in this release:<br />External PHP based binary log consumer.  It wraps 'mysqlbinlog' and reads settings from an .ini file.<br />The consumer must be running in order to refresh views and collect table change logs.<br />MIN/MAX and COUNT(DISTINCT) are now supported, experimentally.  <br />Many other improvements.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22321&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22321&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 04:24:44 +0000</pubDate>
    <dc:creator>Justin Swanhart</dc:creator>
  </item>

  <item>
    <title>How to tell if someone is bullshitting</title>
    <guid isPermaLink="false">http://www.xaprb.com/blog/?p=1444</guid>
    <link>http://www.xaprb.com/blog/2009/11/19/how-to-tell-if-someone-is-bullshitting/</link>
    <description>Ever been around a group of people discussing some technology and heard Cool-Whip phrases like this?

It&amp;#8217;s not about MySQL versus PostgreSQL, it&amp;#8217;s about using the right tool for the job.

Or how about this one?

You need to take the important factors into account before you decide whether [hot new fad] or [trusty old solution] is best suited for your application.

Both are signs that someone might be trying to sound important.  In situations like this, I&amp;#8217;ve noticed that the people I look up to usually don&amp;#8217;t make weighty-sounding statements about other people&amp;#8217;s systems.  They talk about what they are qualified to talk about: either they say something about their own systems, or if it&amp;#8217;s warranted and invited, they ask intelligent questions about other people&amp;#8217;s systems.

People who only have vacuous generalities to contribute don&amp;#8217;t talk about their own systems, because if they actually worked on systems that qualified them to contribute to the conversation, they&amp;#8217;d have something of substance to say.  And they don&amp;#8217;t ask questions, because they don&amp;#8217;t know what to ask. (The third option &amp;#8212; say nothing &amp;#8212; seems unacceptable, I guess.)

For the love of all that is good, please do not look back through my blog archives.  I don&amp;#8217;t want to know.

Related posts:Recap of Enterprise LAMP Summit and Camp Last week Seeking input on a badness score for query execution Suppose thMigrating US Government applications from Oracle to MySQL I just ret
Related posts brought to you by Yet Another Related Posts Plugin.</description>
    <content:encoded><![CDATA[<p>Ever been around a group of people discussing some technology and heard Cool-Whip phrases like this?</p>

<blockquote><p>It&#8217;s not about MySQL versus PostgreSQL, it&#8217;s about using the right tool for the job.</p></blockquote>

<p>Or how about this one?</p>

<blockquote><p>You need to take the important factors into account before you decide whether [hot new fad] or [trusty old solution] is best suited for your application.</p></blockquote>

<p>Both are signs that someone might be trying to sound important.  In situations like this, I&#8217;ve noticed that the people I look up to usually don&#8217;t make weighty-sounding statements about other people&#8217;s systems.  They talk about what they are qualified to talk about: either they say something about their own systems, or if it&#8217;s warranted and invited, they ask intelligent questions about other people&#8217;s systems.</p>

<p>People who only have vacuous generalities to contribute don&#8217;t talk about their own systems, because if they actually worked on systems that qualified them to contribute to the conversation, they&#8217;d have something of substance to say.  And they don&#8217;t ask questions, because they don&#8217;t know what to ask. (The third option &#8212; say nothing &#8212; seems unacceptable, I guess.)</p>

<p>For the love of all that is good, please do not look back through my blog archives.  I don&#8217;t want to know.</p>

<p>Related posts:<ol><li><a href="http://www.xaprb.com/blog/2009/11/14/recap-of-enterprise-lamp-summit-and-camp/" rel="bookmark" title="Permanent Link: Recap of Enterprise LAMP Summit and Camp">Recap of Enterprise LAMP Summit and Camp</a> <small>Last week </small></li><li><a href="http://www.xaprb.com/blog/2009/06/26/seeking-input-on-a-badness-score-for-query-execution/" rel="bookmark" title="Permanent Link: Seeking input on a badness score for query execution">Seeking input on a badness score for query execution</a> <small>Suppose th</small></li><li><a href="http://www.xaprb.com/blog/2009/02/19/migrating-us-government-applications-from-oracle-to-mysql/" rel="bookmark" title="Permanent Link: Migrating US Government applications from Oracle to MySQL">Migrating US Government applications from Oracle to MySQL</a> <small>I just ret</small></li></ol></p>
<p>Related posts brought to you by <a href="http://mitcho.com/code/yarpp/">Yet Another Related Posts Plugin</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22319&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22319&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 20 Nov 2009 00:24:01 +0000</pubDate>
    <dc:creator>Baron Schwartz (xaprb)</dc:creator>
    <category>Commentary</category>
    <category>PostgreSQL</category>
    <category>SQL</category>
    <category>mysql</category>
  </item>

  <item>
    <title>Kontrollbase is featured in OSDB Magazine this month</title>
    <guid isPermaLink="false">http://kontrollsoft.com/?p=546</guid>
    <link>http://feedproxy.google.com/~r/Kontrollsoft/~3/B3LbiQNgz34/546</link>
    <description>For those of you interested in the open source database world, you will get a good in-depth look at Kontrollbase this month in the OSDB Magazine. Keith Murphy has been kind enough to give me pages 37 through 50 to tell you all about the history, current features, and plans for the future. It&amp;#8217;s a [...]</description>
    <content:encoded><![CDATA[For those of you interested in the open source database world, you will get a good in-depth look at Kontrollbase this month in the OSDB Magazine. Keith Murphy has been kind enough to give me pages 37 through 50 to tell you all about the history, current features, and plans for the future. It&#8217;s a [...]<img src="http://feeds.feedburner.com/~r/Kontrollsoft/~4/B3LbiQNgz34" height="1" width="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22317&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22317&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 19 Nov 2009 20:29:15 +0000</pubDate>
    <dc:creator>Matt Reid</dc:creator>
    <category>announcement</category>
  </item>

  <item>
    <title>Kontrollbase demo back online</title>
    <guid isPermaLink="false">http://kontrollsoft.com/?p=544</guid>
    <link>http://feedproxy.google.com/~r/Kontrollsoft/~3/GmaupDEbdG8/544</link>
    <description>It&amp;#8217;s been hectic to find a good provider even with all of the choices out there these days but I&amp;#8217;m happy to let you know that we settled on ServerBeach for the demo server and are back online. The page load testing is positive and quick, and all features are available for you to try. [...]</description>
    <content:encoded><![CDATA[It&#8217;s been hectic to find a good provider even with all of the choices out there these days but I&#8217;m happy to let you know that we settled on ServerBeach for the demo server and are back online. The page load testing is positive and quick, and all features are available for you to try. [...]<img src="http://feeds.feedburner.com/~r/Kontrollsoft/~4/GmaupDEbdG8" height="1" width="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22318&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22318&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 19 Nov 2009 20:23:02 +0000</pubDate>
    <dc:creator>Matt Reid</dc:creator>
    <category>announcement</category>
  </item>

  <item>
    <title>MySQL Permissions &amp;#8211; Restarting MySQL</title>
    <guid isPermaLink="false">http://ronaldbradford.com/blog/?p=2254</guid>
    <link>http://ronaldbradford.com/blog/mysql-permissions-restarting-mysql-2009-11-19/</link>
    <description>I am working with a client that is using managed hosting on dedicated servers. This has presented new challenges in obtaining the right permissions to undertake MySQL tasks but not have either &amp;#8216;root&amp;#8217; or &amp;#8216;mysql&amp;#8217; access and not have to involve a third party everytime.
Adding the following to the /etc/sudoers file enabled the ability to restart MySQL.

User_Alias	DBA = rbradfor, user2, etc
Host_Alias 	DB_SERVERS = server1.example.com, server2.example.com, etc
Cmnd_Alias	MYSQL = /etc/init.d/mysqld, /usr/sbin/tcpdump

DBA DB_SERVERS = MYSQL

As you can see I also got tcpdump, which I find valuable to monitor via mk-query-digest.
Next, permissions for log files.</description>
    <content:encoded><![CDATA[<p>I am working with a client that is using managed hosting on dedicated servers. This has presented new challenges in obtaining the right permissions to undertake MySQL tasks but not have either &#8216;root&#8217; or &#8216;mysql&#8217; access and not have to involve a third party everytime.</p>
<p>Adding the following to the /etc/sudoers file enabled the ability to restart MySQL.</p>
<pre>
User_Alias	DBA = rbradfor, user2, etc
Host_Alias 	DB_SERVERS = server1.example.com, server2.example.com, etc
Cmnd_Alias	MYSQL = /etc/init.d/mysqld, /usr/sbin/tcpdump

DBA DB_SERVERS = MYSQL
</pre>
<p>As you can see I also got tcpdump, which I find valuable to monitor via <a href="http://www.maatkit.org/doc/mk-query-digest.html">mk-query-digest</a>.</p>
<p>Next, permissions for log files.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22315&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22315&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 19 Nov 2009 18:10:34 +0000</pubDate>
    <dc:creator>Ronald Bradford</dc:creator>
    <category>Databases</category>
    <category>Linux</category>
    <category>MySQL</category>
    <category>Professional</category>
    <category>Uncategorized</category>
    <category>maatkit</category>
    <category>restarting mysql</category>
    <category>start mysql</category>
    <category>stop mysql</category>
    <category>unix permissions</category>
  </item>

  <item>
    <title>again, on benchmarks</title>
    <guid isPermaLink="false">http://mituzas.lt/?p=645</guid>
    <link>http://mituzas.lt/2009/11/19/again-on-benchmarks/</link>
    <description>Dear interweb, if you have no idea what you&amp;#8217;re writing about, keep it to yourself, don&amp;#8217;t litter into the tubes. Some people may not notice they&amp;#8217;re eating absolute crap and get diarrhea.
This particular benchmark has two favorite parts, that go with each other together really well:
I didnt change absolutely any parameters for the servers, eg didn&amp;#8217;t change the innodb_buffer_pool_size or key_buffer_size.
And..
If you need speed just to fetch a data for a given combination or key, Redis is a solution that you need to look at. MySQL can no way compare to Redis and Memcache. &amp;#8230;
Seriously, how does one repay for all the damage of such idiotic benchmarks?
P.S. I&amp;#8217;ve ranted at benchmarks before, and will continue doing so.</description>
    <content:encoded><![CDATA[<p>Dear interweb, if you have <a href="http://www.ruturaj.net/redis-memcached-tokyo-tyrant-mysql-comparison">no idea</a> what you&#8217;re writing about, keep it to yourself, don&#8217;t litter into the tubes. Some people may not notice they&#8217;re eating absolute crap and get diarrhea.</p>
<p>This particular benchmark has two favorite parts, that go with each other together really well:</p>
<p>I didnt change absolutely any parameters for the servers, eg didn&#8217;t change the innodb_buffer_pool_size or key_buffer_size.</p>
<p>And..</p>
<p>If you need speed just to fetch a data for a given combination or key, Redis is a solution that you need to look at. MySQL can no way compare to Redis and Memcache. &#8230;</p>
<p>Seriously, how does one repay for all the damage of such idiotic benchmarks?</p>
<p>P.S. I&#8217;ve <a href="http://mituzas.lt/2009/06/30/on-file-system-benchmarks/">ranted</a> at benchmarks before, and will continue doing so.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22314&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22314&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 19 Nov 2009 18:03:34 +0000</pubDate>
    <dc:creator>Domas Mituzas</dc:creator>
    <category>mysql</category>
    <category>benchmarks</category>
    <category>performance</category>
    <category>rant</category>
  </item>

  <item>
    <title>Fine-tuning FULLTEXT: Adding word characters</title>
    <guid isPermaLink="false">http://thenoyes.com/littlenoise/?p=91</guid>
    <link>http://thenoyes.com/littlenoise/?p=91</link>
    <description>Perhaps you want &amp;#8220;.&amp;#8221; or &amp;#8220;:&amp;#8221; or &amp;#8220;-&amp;#8221; or something to be treated as a word character so that you can do a fulltext match against an IP or MAC address.
If you want to change the set of characters that are considered word characters, you can do so in two ways&amp;#8230;
* Modify the MySQL source &amp;#8230; and recompile MySQL.
* Modify a character set file: This requires no recompilation.            
Thus sayeth the Manual. What it doesn&amp;#8217;t say is just what to modify in that character set file. I had to ask MySQL developer Alexander Barkov for help to get it right.
In the user comments on that manual page, John Navratil has provided most of the answer, but there&amp;#8217;s an important step missing: adding a new collation.

The &amp;#8220;normal&amp;#8221; collations like latin1_swedish_ci are compiled in. But we don&amp;#8217;t really want to mess with those anyway, because then the parser might become confused: you still want &amp;#8220;-&amp;#8221; to indicate subtraction everywhere except inside your fulltext search, right?
First, find your character set files. Typically they&amp;#8217;re under [MySQL Install Path]\share\charsets, but you can double check that with SHOW VARIABLES LIKE 'character_sets_dir';
Edit Index.xml. Find the section for the character set you want to use (I&amp;#8217;m using latin1), and add a new collation, with a new name and an unused id:
&amp;lt;collation name=&quot;latin1_ft_ci&quot;	id=&quot;62&quot;/&amp;gt;
Edit the character set file (latin1.xml in my example). Near the top you&amp;#8217;ll find a &amp;lt;ctype&amp;gt; array. There&amp;#8217;s a leading 00 (which is there to offset the array to 257 characters for some legacy EOF convention, per the manual.) After that, you&amp;#8217;ll find 256 bytes which identify the type of each character in the set. Find the hex value for the character you want (MySQL&amp;#8217;s HEX() function is handy for this.) The value for &amp;#8220;:&amp;#8221; is 0&amp;#215;3A. Find that position in the array. Remember to start at 0&amp;#215;00, so 0&amp;#215;3A is the fourth row down, and the eleventh in from the left. Change the 10 there (which means spacing character) to 01 (which means upper case letter.) You&amp;#8217;ll find the rest of the possible character types in the manual.
Scroll down in the same file and find the collations. Copy and paste the whole map from whichever one you normally use (like latin1_swedish_ci) and change the name to match the one we created in the Index.xml file (like latin1_ft_ci).
Restart the server and check that the new collation appears:
SHOW COLLATION LIKE 'latin1_ft_ci';
Finally, alter your table to use the new collation for the fulltext column:
ALTER TABLE tblName MODIFY textColumn TEXT COLLATE latin1_ft_ci;
And now your fulltext search ought to work.
Before and after:
mysql&gt; SELECT * FROM t1 WHERE MATCH(d) against ('00:12:34:56:78:9A');
Empty set (0.00 sec)

mysql&gt; ALTER TABLE t1 MODIFY d TEXT COLLATE latin1_ft_ci;
Query OK, 4 row affected (0.03 sec)
Records: 4  Duplicates: 0  Warnings: 0

mysql&gt; SELECT * FROM t1 WHERE MATCH(d) against ('00:12:34:56:78:9A');
+-------------------+
| d                 |
+-------------------+
| 00:12:34:56:78:9A |
+-------------------+
1 row in set (0.01 sec)</description>
    <content:encoded><![CDATA[<p>Perhaps you want &#8220;.&#8221; or &#8220;:&#8221; or &#8220;-&#8221; or something to be treated as a word character so that you can do a fulltext match against an IP or MAC address.</p>
<blockquote><p>If you want to change the set of characters that are considered word characters, you can do so in two ways&#8230;<br />
* Modify the MySQL source &#8230; and recompile MySQL.<br />
* Modify a character set file: This requires no recompilation.            </p></blockquote>
<p>Thus sayeth the <a href="http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html">Manual</a>. What it doesn&#8217;t say is just what to modify in that character set file. I had to ask MySQL developer Alexander Barkov for help to get it right.</p>
<p>In the user comments on that manual page, John Navratil has provided most of the answer, but there&#8217;s an important step missing: adding a new collation.<br />
<span></span><br />
The &#8220;normal&#8221; collations like latin1_swedish_ci are compiled in. But we don&#8217;t really want to mess with those anyway, because then the parser might become confused: you still want &#8220;-&#8221; to indicate subtraction everywhere except inside your fulltext search, right?</p>
<p>First, find your character set files. Typically they&#8217;re under [MySQL Install Path]\share\charsets, but you can double check that with <code>SHOW VARIABLES LIKE 'character_sets_dir';</code></p>
<p>Edit Index.xml. Find the section for the character set you want to use (I&#8217;m using latin1), and add a new collation, with a new name and an unused id:</p>
<p><code>&lt;collation name="latin1_ft_ci"	id="62"/&gt;</code></p>
<p>Edit the character set file (latin1.xml in my example). Near the top you&#8217;ll find a <code>&lt;ctype&gt;</code> array. There&#8217;s a leading 00 (which is there to offset the array to 257 characters for some legacy EOF convention, per the <a href="http://dev.mysql.com/doc/refman/5.0/en/character-arrays.html">manual</a>.) After that, you&#8217;ll find 256 bytes which identify the type of each character in the set. Find the hex value for the character you want (MySQL&#8217;s HEX() function is handy for this.) The value for &#8220;:&#8221; is 0&#215;3A. Find that position in the array. Remember to start at 0&#215;00, so 0&#215;3A is the fourth row down, and the eleventh in from the left. Change the 10 there (which means spacing character) to 01 (which means upper case letter.) You&#8217;ll find the rest of the possible character types in the <a href="http://dev.mysql.com/doc/refman/5.0/en/character-arrays.html">manual</a>.</p>
<p>Scroll down in the same file and find the collations. Copy and paste the whole map from whichever one you normally use (like latin1_swedish_ci) and change the name to match the one we created in the Index.xml file (like latin1_ft_ci).</p>
<p>Restart the server and check that the new collation appears:</p>
<p><code>SHOW COLLATION LIKE 'latin1_ft_ci';</code></p>
<p>Finally, alter your table to use the new collation for the fulltext column:</p>
<p><code>ALTER TABLE tblName MODIFY textColumn TEXT COLLATE latin1_ft_ci;</code></p>
<p>And now your fulltext search ought to work.</p>
<p>Before and after:</p>
<pre>mysql> SELECT * FROM t1 WHERE MATCH(d) against ('00:12:34:56:78:9A');
Empty set (0.00 sec)

mysql> ALTER TABLE t1 MODIFY d TEXT COLLATE latin1_ft_ci;
Query OK, 4 row affected (0.03 sec)
Records: 4  Duplicates: 0  Warnings: 0

mysql> SELECT * FROM t1 WHERE MATCH(d) against ('00:12:34:56:78:9A');
+-------------------+
| d                 |
+-------------------+
| 00:12:34:56:78:9A |
+-------------------+
1 row in set (0.01 sec)</pre><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22313&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22313&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 19 Nov 2009 14:27:01 +0000</pubDate>
    <dc:creator>Scott Noyes</dc:creator>
    <category>MySQL FAQ</category>
  </item>

  <item>
    <title>Redis, Memcached, Tokyo Tyrant and MySQL comparision</title>
    <guid isPermaLink="false">245 at http://www.ruturaj.net</guid>
    <link>http://www.ruturaj.net/redis-memcached-tokyo-tyrant-mysql-comparison</link>
    <description>I wanted to compare the following DBs, NoSQLs and caching solutions for speed and connections. Tested the following

Redis
Memcached
Tokyo Tyrant / Tokyo Cabinet
MySQL 5.1.40 (MyISAM)
MySQL 5.1.40 (with Innodb Plugin 1.0.4), compiled into source of MySQL

	My test had the following criteria

2 client boxes
All clients connecting to the server using Python
Used Python's threads to create concurrency
Each thread made 10,000 open-close connections to the server
The server was

Intel(R) Pentium(R) D CPU 3.00GHz
Fedora 10 32bit
Intel(R) Pentium(R) D CPU 3.00GHz
2.6.27.38-170.2.113.fc10.i686 #1 SMP
1GB RAM


Used a md5 as key and a value that was saved
Created an index on the key column of the table
Each server had SET and GET requests as a different test at same concurrency

Results please !
read more</description>
    <content:encoded><![CDATA[<p>I wanted to compare the following DBs, NoSQLs and caching solutions for speed and connections. Tested the following</p>
<ul>
<li><a href="http://code.google.com/p/redis/">Redis</a></li>
<li><a href="http://memcached.org/">Memcached</a></li>
<li><a href="http://code.google.com/p/redis/">Tokyo Tyrant / Tokyo Cabinet</a></li>
<li><a href="http://1978th.net/tokyotyrant/">MySQL 5.1.40 (MyISAM)</a></li>
<li><a href="http://www.innodb.com/products/innodb_plugin/">MySQL 5.1.40 (with Innodb Plugin 1.0.4), compiled into source of MySQL</a></li>
</ul>
<p>	My test had the following criteria</p>
<ul>
<li>2 client boxes</li>
<li>All clients connecting to the server using Python</li>
<li>Used Python's threads to create concurrency</li>
<li>Each thread made 10,000 open-close connections to the server</li>
<li>The server was
<ul>
<li>Intel(R) Pentium(R) D CPU 3.00GHz</li>
<li>Fedora 10 32bit</li>
<li>Intel(R) Pentium(R) D CPU 3.00GHz</li>
<li>2.6.27.38-170.2.113.fc10.i686 #1 SMP</li>
<li>1GB RAM</li>
</ul>
</li>
<li>Used a md5 as key and a value that was saved</li>
<li>Created an index on the key column of the table</li>
<li>Each server had SET and GET requests as a different test at same concurrency</li>
</ul>
<p>Results please !</p>
<p><a href="http://www.ruturaj.net/redis-memcached-tokyo-tyrant-mysql-comparison">read more</a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22312&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22312&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 19 Nov 2009 08:06:03 +0000</pubDate>
    <dc:creator>Ruturaj Vartak</dc:creator>
    <category>memcache</category>
    <category>redis</category>
    <category>tokyo tyrant</category>
    <category>MySQL</category>
  </item>

  <item>
    <title>Formation Optimisation MySQL</title>
    <guid isPermaLink="false">http://blogs.sun.com/partnertech/entry/formation_optimisation_mysql</guid>
    <link>http://blogs.sun.com/partnertech/entry/formation_optimisation_mysql</link>
    <description>Désolé, il ne reste plus de place pour cette matinée dédiée à l'optimisation des performances MySQL. 
  Date : 24 novembre 2009
 Session 1 : 9h30-10h45
 
   
     Architecture MySQL : Parsing, exécution, optimizer,
query cache, binlog…etc
 
     Architecture Innodb : Clustered index, bufferpool, hash
index, insert buffer, locking model, MVCC, recovery log, checkpoint…etc. Comparaison avec les autres moteurs de
stockage (PBXT, MySQL Cluster) et bases de données (PostgreSQL, Oracle ..).
 
   
   Pause/Café : 10h45-11h00.
 Session 2 : 11h00-12h30
  
   
     Évolutions récentes : Google SMP patches,&amp;nbsp; XtraDB, Oracle
innodb plugin 1.0.4
 
     Apports de MySQL 5.4 
     Améliorations à venir :&amp;nbsp;
Ahead flushing / Adaptive checkpoint,&amp;nbsp; Purge lag / Purge
thread, Splitted locks, etc…Explication technique des améliorations et des gains de performance obtenus.
 
   
   Nous parlerons aussi de MySQL Enterprise et du MySQL Query 
analyzer qui vous permet d’optimiser un environnement MySQL.
 Cette matinée se veut conviviale et interactive avec Q&amp;amp;A.</description>
    <content:encoded><![CDATA[<p>Désolé, il ne reste plus de place pour cette matinée dédiée à l'optimisation des performances MySQL.</p> 
  <p><b>Date</b> : 24 novembre 2009
<br /> <br /><b>Session 1</b> : 9h30-10h45
<br /></p> 
  <ul> 
    <li> <b>Architecture MySQL</b> : Parsing, exécution, optimizer,
query cache, binlog…etc
</li> 
    <li> <b>Architecture Innodb</b> : Clustered index, bufferpool, hash
index, insert buffer, locking model, MVCC, recovery log, checkpoint…etc. Comparaison avec les autres moteurs de
stockage (PBXT, MySQL Cluster) et bases de données (PostgreSQL, Oracle ..).
</li> 
  </ul> 
  <p> <br />Pause/Café : 10h45-11h00.
<br /> <br /><b>Session 2</b> : 11h00-12h30
<br /> <br /></p> 
  <ul> 
    <li> <b>Évolutions récentes</b> : Google SMP patches,&nbsp; XtraDB, Oracle
innodb plugin 1.0.4
</li> 
    <li> <b>Apports de MySQL 5.4</b></li> 
    <li> <b>Améliorations à venir</b> :&nbsp;
Ahead flushing / Adaptive checkpoint,&nbsp; Purge lag / Purge
thread, Splitted locks, etc…Explication technique des améliorations et des gains de performance obtenus.
</li> 
  </ul> 
  <p> <br />Nous parlerons aussi de MySQL Enterprise et du MySQL Query 
analyzer qui vous permet d’optimiser un environnement MySQL.
<br /> <br />Cette matinée se veut conviviale et interactive avec Q&amp;A.<br /></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22311&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22311&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 19 Nov 2009 07:48:42 +0000</pubDate>
    <dc:creator>Thierry Manfé</dc:creator>
    <category>Français</category>
    <category>formation</category>
    <category>mysql</category>
    <category>optimisation</category>
  </item>

  <item>
    <title>How innodb_open_files affects performance</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1764</guid>
    <link>http://www.mysqlperformanceblog.com/2009/11/18/how-innodb_open_files-affects-performance/</link>
    <description>Recently I looked at table_cache sizing which showed larger table cache does not always provides the best performance.  So I decided to look at yet another similar variable &amp;#8211; innodb_open_files which defines how many files Innodb will keep open while working in innodb_file_per_table mode.
Unlike MyISAM  Innodb does not have to keep open file descriptor when table is open &amp;#8211; open table is purely logical state and appropriate .ibd file may be open or closed.   Furthermore  besides MySQL table_cache Innodb maintains its own (called data dictionary) which keeps all tables ever accessed since table start &amp;#8211; there is no variable to control its size and it can take significant amount of memory in some edge cases.   Percona patches though provide innodb_dict_size_limit to restrict growth of data dictionary.
So I started with same series of test and creating 100.000 tables with single integer column.  The process of creating tables took about 45 minutes which is a lot more than MyISAM and the total size on disk was 12GB  in .ibd files plus some space allocated in system tablespace.  So if you create Innodb tables you better store some data in them otherwise there will be a huge waste of space.
I used MySQL 5.4.2 for tests which should be as good as it gets in terms of optimizations in this space.
To keep test alligned to my previous experiments I was running with table_open_cache=64 and tried innodb_open_files=64 and 16384.
Reading 100.000 tables first time after MySQL time takes about 500 seconds  (so it is some 200 tables/sec) &amp;#8211; first time Innodb actually populates data dictionary.  The second time we do same operation it takes about 25 seconds (4.000 tables/sec) which is quite a difference.   As we can see even in case table it fully in Innodb data dictionary the operation is slower than MyISAM tables. Though the difference can be related to the size of set of empty tables which is about 10 times smaller for MyISAM.  
I found no significant difference whatever limit of open files was, which is not surprising as logical operation of opening file is rather fast on local file system &amp;#8211; one can open/close file hundreds of thousands times per second.
To verify this I tried doing &amp;#8220;open table&amp;#8221; test for only 10K out of 100K tables &amp;#8211; the performance was about the same, taking 1sec (on the second time) . Whenever innodb_open_files_limit was 64 (virtually all misses ) or 16384 (all hits) performance was the same.
As I mentioned Data Dictionary can take considerable amount of memory &amp;#8211; In my case after reading all tables I got &amp;#8220;Dictionary memory allocated 392029720&amp;#8243;  which means very simple single tables takes about 4KB of space in data dictionary.  More complicated tables can take a bit more. 
So innodb_open_files does not affect performance a lot on reads &amp;#8211; what is about writes ?  I tried again very simple test inserting the row in each of 100K tables.  This test ran  about 180sec first time and about 260sec second time (with innodb_flush_log_at_trx_commit=0) go giving  550 and 380 updates/sec appropriately.    Why was second time slower and not faster ?  Because on the second run there were a lot of dirty pages in innodb buffer pool which had to be flushed before recycling.   First ran however was done with clean buffer pool (after reading all tables once)
Same as with select case I could not see any measurable difference between two tested innodb_open_files values.
Finally I decided to test the crash recovery &amp;#8211; does it make any difference ? 
The crash recovery in Innodb is nasty if you have a lot of tables:

091118 18:43:36  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files&amp;#8230;
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer&amp;#8230;
InnoDB: Doing recovery: scanned up to log sequence number 12682768136
091118 18:47:44  InnoDB: Starting an apply batch of log records to the database&amp;#8230;

If Innodb detects it is not shut down properly it will scan all .ibd files which took a bit over 4 minutes for 100K tables but which obviously can take a lot more if there are more tables or they are less cached than in this case.    This part of data recovery does not depends on amount of records which need to be applied just about number of tables.
With innodb_open_files=64  I got bunch of warning messages during recovery:

091118 18:47:44  InnoDB: Warning: too many (67) files stay open while the maximum
InnoDB: allowed value would be 64.
InnoDB: You may need to raise the value of innodb_max_files_open in
InnoDB: my.cnf.
InnoDB: fil_sys open file LRU len 0
091118 18:47:44  InnoDB: Warning: too many (68) files stay open while the maximum
InnoDB: allowed value would be 64.
InnoDB: You may need to raise the value of innodb_max_files_open in
InnoDB: my.cnf

So we can see Innodb may with to have so many open files during recovery stage and it will open more files than allowed if needed.
Both scanning open files and applying logs took about 9 minutes in this setup.  This number of course can change a lot depending on hardware log file size workload and even when crash happen (how many unflushed changes we had)
Repeating test with innodb_open_files=16384 I got about same crash recovery speed though with no warnings. 
So it looks like innodb_open_files_limit=300  is not being that large liability even with large number of tables and you can also safely increase this number if you like &amp;#8211; there is no any surprises such as surprised slow downs for replacing open files in the list.  I guess Heikki knows how to implement LRU in the end   
    
    Entry posted by peter |
      2 comments
    Add to:  |  |  |  | </description>
    <content:encoded><![CDATA[<p>Recently I <a href="http://www.mysqlperformanceblog.com/2009/11/16/table_cache-negative-scalability/">looked at table_cache sizing</a> which showed larger table cache does not always provides the best performance.  So I decided to look at yet another similar variable &#8211; <strong>innodb_open_files</strong> which defines how many files Innodb will keep open while working in <strong>innodb_file_per_table</strong> mode.</p>
<p>Unlike MyISAM  Innodb does not have to keep open file descriptor when table is open &#8211; open table is purely logical state and appropriate .ibd file may be open or closed.   Furthermore  besides MySQL <strong>table_cache</strong> Innodb maintains its own (called data dictionary) which keeps all tables ever accessed since table start &#8211; there is no variable to control its size and it can take significant amount of memory in some edge cases.   Percona patches though provide <strong>innodb_dict_size_limit</strong> to restrict growth of data dictionary.</p>
<p>So I started with same series of test and creating 100.000 tables with single integer column.  The process of creating tables took about <strong>45 minutes</strong> which is a lot more than MyISAM and the total size on disk was <strong>12GB</strong>  in .ibd files plus some space allocated in system tablespace.  So if you create Innodb tables you better store some data in them otherwise there will be a huge waste of space.</p>
<p>I used MySQL 5.4.2 for tests which should be as good as it gets in terms of optimizations in this space.</p>
<p>To keep test alligned to my previous experiments I was running with <strong>table_open_cache=64</strong> and tried <strong>innodb_open_files=64 and 16384</strong>.</p>
<p>Reading 100.000 tables first time after MySQL time takes about 500 seconds  (so it is some <strong>200 tables/sec</strong>) &#8211; first time Innodb actually populates data dictionary.  The second time we do same operation it takes about 25 seconds (4.000 tables/sec) which is quite a difference.   As we can see even in case table it fully in Innodb data dictionary the operation is slower than MyISAM tables. Though the difference can be related to the size of set of empty tables which is about 10 times smaller for MyISAM.  </p>
<p>I found no significant difference whatever limit of open files was, which is not surprising as logical operation of opening file is rather fast on local file system &#8211; one can open/close file hundreds of thousands times per second.</p>
<p>To verify this I tried doing &#8220;open table&#8221; test for only 10K out of 100K tables &#8211; the performance was about the same, taking 1sec (on the second time) . Whenever innodb_open_files_limit was 64 (virtually all misses ) or 16384 (all hits) performance was the same.</p>
<p>As I mentioned Data Dictionary can take considerable amount of memory &#8211; In my case after reading all tables I got<strong> &#8220;Dictionary memory allocated 392029720&#8243; </strong> which means very simple single tables takes about 4KB of space in data dictionary.  More complicated tables can take a bit more. </p>
<p>So innodb_open_files does not affect performance a lot on reads &#8211; what is about writes ?  I tried again very simple test inserting the row in each of 100K tables.  This test ran  about 180sec first time and about 260sec second time (with<strong> innodb_flush_log_at_trx_commit=0</strong>) go giving  550 and 380 updates/sec appropriately.    Why was second time slower and not faster ?  Because on the second run there were a lot of dirty pages in innodb buffer pool which had to be flushed before recycling.   First ran however was done with clean buffer pool (after reading all tables once)</p>
<p>Same as with select case I could not see any measurable difference between two tested <strong>innodb_open_files</strong> values.</p>
<p>Finally I decided to test the crash recovery &#8211; does it make any difference ? </p>
<p>The crash recovery in Innodb is nasty if you have a lot of tables:</p>
<blockquote><p>
091118 18:43:36  InnoDB: Database was not shut down normally!<br />
InnoDB: Starting crash recovery.<br />
InnoDB: Reading tablespace information from the .ibd files&#8230;<br />
InnoDB: Restoring possible half-written data pages from the doublewrite<br />
InnoDB: buffer&#8230;<br />
InnoDB: Doing recovery: scanned up to log sequence number 12682768136<br />
091118 18:47:44  InnoDB: Starting an apply batch of log records to the database&#8230;
</p></blockquote>
<p>If Innodb detects it is not shut down properly it will scan all .ibd files which took a bit over 4 minutes for 100K tables but which obviously can take a lot more if there are more tables or they are less cached than in this case.    This part of data recovery does not depends on amount of records which need to be applied just about number of tables.</p>
<p>With innodb_open_files=64  I got bunch of warning messages during recovery:</p>
<blockquote><p>
091118 18:47:44  InnoDB: Warning: too many (67) files stay open while the maximum<br />
InnoDB: allowed value would be 64.<br />
InnoDB: You may need to raise the value of innodb_max_files_open in<br />
InnoDB: my.cnf.<br />
InnoDB: fil_sys open file LRU len 0<br />
091118 18:47:44  InnoDB: Warning: too many (68) files stay open while the maximum<br />
InnoDB: allowed value would be 64.<br />
InnoDB: You may need to raise the value of innodb_max_files_open in<br />
InnoDB: my.cnf
</p></blockquote>
<p>So we can see Innodb may with to have so many open files during recovery stage and it will open more files than allowed if needed.</p>
<p>Both scanning open files and applying logs took about 9 minutes in this setup.  This number of course can change a lot depending on hardware log file size workload and even when crash happen (how many unflushed changes we had)</p>
<p>Repeating test with <strong>innodb_open_files=16384</strong> I got about same crash recovery speed though with no warnings. </p>
<p>So it looks like innodb_open_files_limit=300  is not being that large liability even with large number of tables and you can also safely increase this number if you like &#8211; there is no any surprises such as surprised slow downs for replacing open files in the list.  I guess Heikki knows how to implement LRU in the end <img src="http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" />  </p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by peter |
      <a href="http://www.mysqlperformanceblog.com/2009/11/18/how-innodb_open_files-affects-performance/#comments">2 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/11/18/how-innodb_open_files-affects-performance/&amp;title=How%20innodb_open_files%20affects%20performance" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/11/18/how-innodb_open_files-affects-performance/&amp;title=How%20innodb_open_files%20affects%20performance" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/11/18/how-innodb_open_files-affects-performance/&amp;title=How%20innodb_open_files%20affects%20performance" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/11/18/how-innodb_open_files-affects-performance/&amp;T=How%20innodb_open_files%20affects%20performance" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/11/18/how-innodb_open_files-affects-performance/&amp;title=How%20innodb_open_files%20affects%20performance" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22308&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22308&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 19 Nov 2009 02:58:56 +0000</pubDate>
    <dc:creator>MySQL Performance Blog</dc:creator>
    <category>Innodb</category>
    <category>mysql</category>
  </item>

  <item>
    <title>Debugging and ripple effects</title>
    <guid isPermaLink="false">http://hackmysql.com/blog/?p=92</guid>
    <link>http://hackmysql.com/blog/2009/11/18/debugging-and-ripple-effects/</link>
    <description>Like I said earlier, every tiny change that the test suite reveals after code changes is significant.  I caught a very subtle &amp;#8220;bug&amp;#8221; today in recent changes to mk-query-digest (a.k.a. mqd).  If you like to read about subtle bugs, read on.
An mqd test on sample file slow023.txt began to differ after some pretty extensive code changes of late:

&lt; # Query 1: 0 QPS, 0x concurrency, ID 0x8E38374648788E52 at byte 0 ________
---
&gt; # Query 1: 0 QPS, 0x concurrency, ID 0x2CFD93750B99C734 at byte 0 ________

The ID which depends on the query&amp;#8217;s fingerprint has changed.  It&amp;#8217;s very important that we don&amp;#8217;t suddenly change these on users because these IDs are pivotal in trend analyses with mqd&amp;#8217;s --review-history option. First some background info on the recent code changes and then the little story about how I tracked down the source of this change.
mqd internals used to run like this: call parser module (like SlowLogParser) and pass it an array of callbacks which it ran events through.  Now this has changed so there&amp;#8217;s a single, unified pipeline of &amp;#8220;callbacks&amp;#8221; (they&amp;#8217;re technically no longer callbacks).  The first process in the pipeline is usually a parser module which returns each event and then mqd keeps pumping the events through the pipeline (in contrast to before where the parser module did the pumping).  So &amp;#8220;obviously&amp;#8221; this has nothing to do with query fingerprinting or ID making which is done in code that has not changed.  Thus, this &amp;#8220;bug&amp;#8221; was very perplexing at first.
First step: see what value make_checksum(), which makes the query IDs, used to get and gets now by using the Perl debugger:

DB x $item
0  'select count(*) as a from x '


DB x $item
0  'select count(*) as a from x'

The difference is that single trailing space. But why has this space suddenly disappeared in the new (later) rev? Something in fingerprint() must have changed, which is the sub that makes that query.  Use the debugger again to step through fingerprint() while a watch is set on the var:

1574:	   $query =~ s/\A\s+//;                  # Chop off leading whitespace
  DB
Watchpoint 0:	$query changed:
    old value:	' select count(*) as A from X
'
    new value:	'select count(*) as A from X
'
QueryRewriter::fingerprint(bin/mk-query-digest:1575):
1575:	   chomp $query;                         # Kill trailing whitespace
  DB
QueryRewriter::fingerprint(bin/mk-query-digest:1576):
1576:	   $query =~ tr[ \n\t\r\f][ ]s;          # Collapse whitespace
  DB
Watchpoint 0:	$query changed:
    old value:	'select count(*) as A from X
'
    new value:	'select count(*) as A from X '

Notice that the var did not change after the line &amp;#8220;# Kill trailing whitespace&amp;#8221; was executed.  The trailing newline was removed and reduced to a single trailing space when &amp;#8220;# Collapse whitespace&amp;#8221; was executed.  The new rev:

1585:	   $query =~ s/\A\s+//;                  # Chop off leading whitespace
  DB
Watchpoint 0:	$query changed:
    old value:	' select count(*) as A from X
'
    new value:	'select count(*) as A from X
'
QueryRewriter::fingerprint(../mk-query-digest:1586):
1586:	   chomp $query;                         # Kill trailing whitespace
  DB
Watchpoint 0:	$query changed:
    old value:	'select count(*) as A from X
'
    new value:	'select count(*) as A from X'

Notice how chomp in the new rev removed all trailing whitespace; the result of chomp has changed, but why?  In case you didn&amp;#8217;t know, chomp actually chomps any trailing $INPUT_RECORD_SEPARATOR, not just newlines.  It just so happens that many of the parser modules change $INPUT_RECORD_SEPARATOR.
The root of this subtle but very important change is due to the fact that the parser modules no longer call the pipeline callbacks.  When they did, their changes to $INPUT_RECORD_SEPARATOR were visible to the callbacks, and operations like fingerprint() are part of the callbacks.  Now that they do not, their changes to $INPUT_RECORD_SEPARATOR are &amp;#8220;invisible&amp;#8221; and operations like fingerprint() see a different (i.e. the default) $INPUT_RECORD_SEPARATOR.
Conclusion in brief: an issue of scope at the beginning of mk-query-digest affects chomp causing fingerprint() and make_checksum() to generate different query IDs at the end of the script.</description>
    <content:encoded><![CDATA[<p>Like I <a href="http://hackmysql.com/blog/2009/10/30/zero-is-a-big-number/">said earlier</a>, every tiny change that the test suite reveals after code changes is significant.  I caught a very subtle &#8220;bug&#8221; today in recent changes to mk-query-digest (a.k.a. mqd).  If you like to read about subtle bugs, read on.</p>
<p>An mqd test on sample file slow023.txt began to differ after some pretty extensive code changes of late:<br />
<code><br />
< # Query 1: 0 QPS, 0x concurrency, ID 0x8E38374648788E52 at byte 0 ________<br />
---<br />
> # Query 1: 0 QPS, 0x concurrency, ID 0x2CFD93750B99C734 at byte 0 ________<br />
</code><br />
The ID which depends on the query&#8217;s fingerprint has changed.  It&#8217;s very important that we don&#8217;t suddenly change these on users because these IDs are pivotal in trend analyses with mqd&#8217;s <code>--review-history</code> option. First some background info on the recent code changes and then the little story about how I tracked down the source of this change.</p>
<p>mqd internals used to run like this: call parser module (like SlowLogParser) and pass it an array of callbacks which it ran events through.  Now this has changed so there&#8217;s a single, unified pipeline of &#8220;callbacks&#8221; (they&#8217;re technically no longer callbacks).  The first process in the pipeline is usually a parser module which returns each event and then mqd keeps pumping the events through the pipeline (in contrast to before where the parser module did the pumping).  So &#8220;obviously&#8221; this has nothing to do with query fingerprinting or ID making which is done in code that has not changed.  Thus, this &#8220;bug&#8221; was very perplexing at first.</p>
<p>First step: see what value <code>make_checksum()</code>, which makes the query IDs, used to get and gets now by using the Perl debugger:<br />
<code><br />
DB<3> x $item<br />
0  'select count(*) as a from x '<br />
</code><br />
<code><br />
DB<12> x $item<br />
0  'select count(*) as a from x'<br />
</code><br />
The difference is that single trailing space. But why has this space suddenly disappeared in the new (later) rev? Something in <code>fingerprint()</code> must have changed, which is the sub that makes that query.  Use the debugger again to step through <code>fingerprint()</code> while a watch is set on the var:<br />
<code><br />
1574:	   $query =~ s/\A\s+//;                  # Chop off leading whitespace<br />
  DB<6><br />
Watchpoint 0:	$query changed:<br />
    old value:	' select count(*) as A from X<br />
'<br />
    new value:	'select count(*) as A from X<br />
'<br />
QueryRewriter::fingerprint(bin/mk-query-digest:1575):<br />
1575:	   chomp $query;                         # Kill trailing whitespace<br />
  DB<6><br />
QueryRewriter::fingerprint(bin/mk-query-digest:1576):<br />
1576:	   $query =~ tr[ \n\t\r\f][ ]s;          # Collapse whitespace<br />
  DB<6><br />
Watchpoint 0:	$query changed:<br />
    old value:	'select count(*) as A from X<br />
'<br />
    new value:	'select count(*) as A from X '<br />
</code><br />
Notice that the var did not change after the line &#8220;# Kill trailing whitespace&#8221; was executed.  The trailing newline was removed and reduced to a single trailing space when &#8220;# Collapse whitespace&#8221; was executed.  The new rev:<br />
<code><br />
1585:	   $query =~ s/\A\s+//;                  # Chop off leading whitespace<br />
  DB<4><br />
Watchpoint 0:	$query changed:<br />
    old value:	' select count(*) as A from X<br />
'<br />
    new value:	'select count(*) as A from X<br />
'<br />
QueryRewriter::fingerprint(../mk-query-digest:1586):<br />
1586:	   chomp $query;                         # Kill trailing whitespace<br />
  DB<4><br />
Watchpoint 0:	$query changed:<br />
    old value:	'select count(*) as A from X<br />
'<br />
    new value:	'select count(*) as A from X'<br />
</code><br />
Notice how <code>chomp</code> in the new rev removed all trailing whitespace; the result of <code>chomp</code> has changed, but why?  In case you didn&#8217;t know, <code>chomp</code> actually chomps any trailing <code>$INPUT_RECORD_SEPARATOR</code>, not just newlines.  It just so happens that many of the parser modules change <code>$INPUT_RECORD_SEPARATOR</code>.</p>
<p>The root of this subtle but very important change is due to the fact that the parser modules no longer call the pipeline callbacks.  When they did, their changes to <code>$INPUT_RECORD_SEPARATOR</code> were visible to the callbacks, and operations like <code>fingerprint()</code> are part of the callbacks.  Now that they do not, their changes to <code>$INPUT_RECORD_SEPARATOR</code> are &#8220;invisible&#8221; and operations like <code>fingerprint()</code> see a different (i.e. the default) <code>$INPUT_RECORD_SEPARATOR</code>.</p>
<p>Conclusion in brief: an issue of scope at the beginning of mk-query-digest affects <code>chomp</code> causing <code>fingerprint()</code> and <code>make_checksum()</code> to generate different query IDs at the end of the script.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22307&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22307&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 22:58:01 +0000</pubDate>
    <dc:creator>Daniel Nichter</dc:creator>
    <category>Programming</category>
    <category>debugging</category>
    <category>mk-query-digest</category>
  </item>

  <item>
    <title>0.9.5.1 alpha release available</title>
    <guid isPermaLink="false">http://infinidb.org/infinidb-blog/0951-alpha-release-available.html</guid>
    <link>http://infinidb.org/infinidb-blog/0951-alpha-release-available.html</link>
    <description>We are pleased to announce the availablity of the 0.9.5.1 alpha release of InfiniDB Community Edition.&amp;nbsp; This is our latest alpha release and is not recommended for production work.&amp;nbsp;New functionality we&amp;rsquo;ve added with 0.9.5.1 includes:&amp;nbsp;&amp;nbsp;Support for union and union all.&amp;nbsp; Support for 23 new distributed functions.&amp;nbsp;&amp;nbsp;&amp;nbsp; Cleanup of system catalog reduces disk usage on new installs.Support for GCC 4.4 and Ubuntu 9.10.</description>
    <content:encoded><![CDATA[<br/><p>We are pleased to announce the availablity of the 0.9.5.1 alpha release of InfiniDB Community Edition.&nbsp; This is our latest alpha release and is not recommended for production work.&nbsp;<br /><br />New functionality we&rsquo;ve added with 0.9.5.1 includes:&nbsp;&nbsp;</p><br/><br/>Support for union and union all.&nbsp; <br/>Support for 23 new distributed functions.&nbsp;&nbsp;&nbsp; <br/>Cleanup of system catalog reduces disk usage on new installs.<br/>Support for GCC 4.4 and Ubuntu 9.10.<br/><br/><p class="MsoNorRead More...<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22310&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22310&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 20:10:36 +0000</pubDate>
    <dc:creator>Calpont &amp; InfiniDB Project Team</dc:creator>
  </item>

  <item>
    <title>Fast restore one database from a dump of ALL databases</title>
    <guid isPermaLink="false">tag:everythingmysql.ning.com,2009-11-18:3993569:BlogPost:857</guid>
    <link>http://everythingmysql.ning.com/xn/detail/3993569%3ABlogPost%3A857</link>
    <description>There have been times that I needed to restore one database from a dump file that contains all of the databases from the server. There are a few ways to accomplish this goal. One way would be to grep through the entire file for the table schema and insert statements. There are some problems with this method in some environments. For example, what if a table name in the targeted databases had the same name in another database on the same instance? The logic for grep now gets increasingly more complex.

It’s a good thing that the developers at MySQL already thought of this and implemented it, --one-database. In the example below I have created 4 databases, test, test[1-3] and filled each of them with 10K rows. I run mysqldump for all databases and put them in a file called test.all.sql then truncate test2.tbl1. Using mysql with the --one-database option I restore the data to its original state.

Example:

mysql&amp;gt; select min(anum), max(anum) from test.tbl1;
+-----------+-----------+
| min(anum) | max(anum) |
+-----------+-----------+
| 0 | 10000 |
+-----------+-----------+
1 row in set (0.01 sec)

mysql&amp;gt; select min(anum), max(anum) from test1.tbl1;
+-----------+-----------+
| min(anum) | max(anum) |
+-----------+-----------+
| 10001 | 20000 |
+-----------+-----------+
1 row in set (0.01 sec)

mysql&amp;gt; select min(anum), max(anum) from test2.tbl1;
+-----------+-----------+
| min(anum) | max(anum) |
+-----------+-----------+
| 20001 | 30000 |
+-----------+-----------+
1 row in set (0.01 sec)

mysql&amp;gt; select min(anum), max(anum) from test3.tbl1;
+-----------+-----------+
| min(anum) | max(anum) |
+-----------+-----------+
| 30001 | 40000 |
+-----------+-----------+
1 row in set (0.01 sec)

shell&amp;gt; mysqldump -uroot -S mysql.sock --opt --all-databases &amp;gt; test.all.sql

mysql&amp;gt; use test2;

mysql&amp;gt; select count(*) from tbl1;
+----------+
| count(*) |
+----------+
| 10000 |
+----------+
1 row in set (0.01 sec)

mysql&amp;gt; truncate table tbl1;
Query OK, 0 rows affected (0.05 sec)

mysql&amp;gt; select count(*) from tbl1;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)

shell&amp;gt; mysql -uroot -S mysql.sock --one-database test2 &amp;lt; test.all.sql

mysql&amp;gt; select min(anum), max(anum) from test.tbl1;
+-----------+-----------+
| min(anum) | max(anum) |
+-----------+-----------+
| 0 | 10000 |
+-----------+-----------+
1 row in set (0.01 sec)

mysql&amp;gt; select min(anum), max(anum) from test1.tbl1;
+-----------+-----------+
| min(anum) | max(anum) |
+-----------+-----------+
| 10001 | 20000 |
+-----------+-----------+
1 row in set (0.01 sec)

mysql&amp;gt; select min(anum), max(anum) from test2.tbl1;
+-----------+-----------+
| min(anum) | max(anum) |
+-----------+-----------+
| 20001 | 30000 |
+-----------+-----------+
1 row in set (0.01 sec)

mysql&amp;gt; select min(anum), max(anum) from test3.tbl1;
+-----------+-----------+
| min(anum) | max(anum) |
+-----------+-----------+
| 30001 | 40000 |
+-----------+-----------+
1 row in set (0.01 sec)

As you can see test2.tbl1 has the original data back in and we did not have to write our own script to accomplish this.</description>
    <content:encoded><![CDATA[There have been times that I needed to restore one database from a dump file that contains all of the databases from the server. There are a few ways to accomplish this goal. One way would be to grep through the entire file for the table schema and insert statements. There are some problems with this method in some environments. For example, what if a table name in the targeted databases had the same name in another database on the same instance? The logic for grep now gets increasingly more complex.<br />
<br />
It’s a good thing that the developers at MySQL already thought of this and implemented it, <a href="http://dev.mysql.com/doc/refman/5.1/en/mysql-command-options.html#option_mysql_one-database" target="_blank">--one-database</a>. In the example below I have created 4 databases, test, test[1-3] and filled each of them with 10K rows. I run mysqldump for all databases and put them in a file called test.all.sql then truncate test2.tbl1. Using mysql with the <a href="http://dev.mysql.com/doc/refman/5.1/en/mysql-command-options.html#option_mysql_one-database" target="_blank">--one-database</a> option I restore the data to its original state.<br />
<br />
<u>Example:</u><br />
<br />
<b>mysql&gt;</b> select min(anum), max(anum) from test.tbl1;<br />
+-----------+-----------+<br />
| min(anum) | max(anum) |<br />
+-----------+-----------+<br />
| 0 | 10000 |<br />
+-----------+-----------+<br />
1 row in set (0.01 sec)<br />
<br />
<b>mysql&gt;</b> select min(anum), max(anum) from test1.tbl1;<br />
+-----------+-----------+<br />
| min(anum) | max(anum) |<br />
+-----------+-----------+<br />
| 10001 | 20000 |<br />
+-----------+-----------+<br />
1 row in set (0.01 sec)<br />
<br />
<b>mysql&gt;</b> select min(anum), max(anum) from test2.tbl1;<br />
+-----------+-----------+<br />
| min(anum) | max(anum) |<br />
+-----------+-----------+<br />
| 20001 | 30000 |<br />
+-----------+-----------+<br />
1 row in set (0.01 sec)<br />
<br />
<b>mysql&gt;</b> select min(anum), max(anum) from test3.tbl1;<br />
+-----------+-----------+<br />
| min(anum) | max(anum) |<br />
+-----------+-----------+<br />
| 30001 | 40000 |<br />
+-----------+-----------+<br />
1 row in set (0.01 sec)<br />
<br />
<b>shell&gt;</b> mysqldump -uroot -S mysql.sock --opt --all-databases &gt; test.all.sql<br />
<br />
<b>mysql&gt;</b> use test2;<br />
<br />
<b>mysql&gt;</b> select count(*) from tbl1;<br />
+----------+<br />
| count(*) |<br />
+----------+<br />
| 10000 |<br />
+----------+<br />
1 row in set (0.01 sec)<br />
<br />
<b>mysql&gt;</b> truncate table tbl1;<br />
Query OK, 0 rows affected (0.05 sec)<br />
<br />
<b>mysql&gt;</b> select count(*) from tbl1;<br />
+----------+<br />
| count(*) |<br />
+----------+<br />
| 0 |<br />
+----------+<br />
1 row in set (0.00 sec)<br />
<br />
<b>shell&gt;</b> mysql -uroot -S mysql.sock --one-database test2 &lt; test.all.sql<br />
<br />
<b>mysql&gt;</b> select min(anum), max(anum) from test.tbl1;<br />
+-----------+-----------+<br />
| min(anum) | max(anum) |<br />
+-----------+-----------+<br />
| 0 | 10000 |<br />
+-----------+-----------+<br />
1 row in set (0.01 sec)<br />
<br />
<b>mysql&gt;</b> select min(anum), max(anum) from test1.tbl1;<br />
+-----------+-----------+<br />
| min(anum) | max(anum) |<br />
+-----------+-----------+<br />
| 10001 | 20000 |<br />
+-----------+-----------+<br />
1 row in set (0.01 sec)<br />
<br />
<b>mysql&gt;</b> select min(anum), max(anum) from test2.tbl1;<br />
+-----------+-----------+<br />
| min(anum) | max(anum) |<br />
+-----------+-----------+<br />
| 20001 | 30000 |<br />
+-----------+-----------+<br />
1 row in set (0.01 sec)<br />
<br />
<b>mysql&gt;</b> select min(anum), max(anum) from test3.tbl1;<br />
+-----------+-----------+<br />
| min(anum) | max(anum) |<br />
+-----------+-----------+<br />
| 30001 | 40000 |<br />
+-----------+-----------+<br />
1 row in set (0.01 sec)<br />
<br />
As you can see test2.tbl1 has the original data back in and we did not have to write our own script to accomplish this.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22306&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22306&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 20:09:09 +0000</pubDate>
    <dc:creator>Everything MySQL</dc:creator>
  </item>

  <item>
    <title>Got Interviewed</title>
    <guid isPermaLink="false">960 at http://www.krisbuytaert.be/blog</guid>
    <link>http://www.krisbuytaert.be/blog/got-interviewed</link>
    <description>by @botchagalupe
on Virtualization, Open Source tools and DNS Problems

Technorati Tags: dnsproblem drupal ha heartbeat linux-ha mysql pacemaker puppet virtualization xen  Share with Shareomatic! 



  Trackback URL for this post:

  http://www.krisbuytaert.be/blog/trackback/960

</description>
    <content:encoded><![CDATA[<p>by <a href="http://www.johnmwillis.com/devopsdays/devopsdays-09-interview-with-kris-buytaert/">@botchagalupe</a><br />
on Virtualization, Open Source tools and DNS Problems</p>
<p></p>
<div><img alt="Technorati Tags:" src="http://www.krisbuytaert.be/blog/sites/all/modules/technorati/technobubble.gif" /><strong>Technorati Tags: </strong><a href="http://technorati.com/tag/dnsproblem" rel="tag">dnsproblem</a> <a href="http://technorati.com/tag/drupal" rel="tag">drupal</a> <a href="http://technorati.com/tag/ha" rel="tag">ha</a> <a href="http://technorati.com/tag/heartbeat" rel="tag">heartbeat</a> <a href="http://technorati.com/tag/linux-ha" rel="tag">linux-ha</a> <a href="http://technorati.com/tag/mysql" rel="tag">mysql</a> <a href="http://technorati.com/tag/pacemaker" rel="tag">pacemaker</a> <a href="http://technorati.com/tag/puppet" rel="tag">puppet</a> <a href="http://technorati.com/tag/virtualization" rel="tag">virtualization</a> <a href="http://technorati.com/tag/xen" rel="tag">xen</a></div><div> <a href="http://www.shareomatic.com/http%3A//www.krisbuytaert.be/blog/got-interviewed/shareomatic-drupal/Got%20Interviewed"><img src="http://www.shareomatic.com/images/s_16_black.gif" alt="Share with Shareomatic!" title="Post this item on various social news sites with Shareomatic!" /></a> <a href="http://www.shareomatic.com/http%3A//www.krisbuytaert.be/blog/got-interviewed/shareomatic-drupal/Got%20Interviewed">Share with Shareomatic!</a> </div>
<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
<rdf:Description rdf:about="http://www.krisbuytaert.be/blog/got-interviewed" dc:identifier="http://www.krisbuytaert.be/blog/got-interviewed" dc:title="Got Interviewed" trackback:ping="http://www.krisbuytaert.be/blog/trackback/960" />
</rdf:RDF>
-->
<div><div>

  <h3>Trackback URL for this post:</h3>

  <div>http://www.krisbuytaert.be/blog/trackback/960</div>
</div>
</div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22305&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22305&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 20:05:47 +0000</pubDate>
    <dc:creator>Kris Buytaert</dc:creator>
    <category>dnsproblem</category>
    <category>drupal</category>
    <category>ha</category>
    <category>heartbeat</category>
    <category>linux-ha</category>
    <category>mysql</category>
    <category>pacemaker</category>
    <category>puppet</category>
    <category>virtualization</category>
    <category>xen</category>
  </item>

  <item>
    <title>MySQL Workbench 5.2 Beta Quick-Start Tutorial</title>
    <guid isPermaLink="false">http://wb.mysql.com/?p=406</guid>
    <link>http://wb.mysql.com/?p=406</link>
    <description>MySQL Workbench 5.2 introduces a lot of new functionality and therefore this short tutorial will help you to get started quickly.
The Home Screen
The most prominent new addition in respect to previous Workbench releases is the new Home Screen. It allows you to access the main features of Workbench in a nice and easy way and is divided into 4 parts.
The upper Workbench Central panel features a few Links and Action Buttons to quickly access common resources.
The lower Workspace panel shows the main feature sets, grouped horizontally.

SQL Development allows editing and execution of SQL queries and scripts, create or alter database objects and edit table data.
Data Modeling covers the EER Modeling functionality you might already be familiar with from previous MySQL Workbench releases.
Server Administration offers administrative tasks like starting/stopping the server, edit the database server configuration, create user accounts, do data dumps and much more.

To quickly get started, use the following steps.
Home Screen Tutorial

Create a new Connection &amp;#8211; Before you can start any other tasks &amp;#8212; using the SQL Editor, forward engineering your model, or managing your database server, you need to create a new Database Connection. You can do that by using the New Connection Wizard or &amp;#8211; if you are an advanced user &amp;#8211; by using the Manage Connections dialog.You will have to enter the usual connection parameters, like IP address and port the server is running on as well as your username and password.
Open Editor &amp;#8211; After you have created a new connection, it will be displayed in the list of available Database Connections. Simply double-click on the list entry to open a SQL Editor and start querying.
Create a new model - If you want to start your work by designing a visual database design first, click the Create new EER Model action item. An empty model will be created for you, only featuring the my_db schema which you can easily rename to the desired name.
Create a New Server Profile &amp;#8211; In order to administer your database server you have to register it within MySQL Workbench first.  Use the New Server Profile Wizard or &amp;#8211; if you are an advanced user &amp;#8211; use the Manage Server Profiles dialog.
Open Admin &amp;#8211; Once the new Server Profile is registered and appears in the list box you can double-click it to open the Admin.

Let&amp;#8217;s take a closer look at the SQL Editor.
SQL Editor
The SQL Editor features a straight forward interface that gets you going, immediately.
SQL Editor Tutorial

 To give you instant access to your database objects we have added the Live Schema Overview panel to the SQL Editor. To start editing the data of an existing table, insert new data rows or manipulate existing data, simply double-click on the table.
You can also modify the table structure by right-clicking on the table and select Alter &amp;#8230; . This also works for any other database object.
Enter your SQL queries and scripts on the SQL Statement panel. You can execute a single or multiple statements at the same time by clicking the Execution Arrow toolbar icon or hitting Ctrl+Return on the keyboard.
If you create new objects by using SQL statements make sure to click the Refresh toolbar icon to update the Live Schema Overview panel and the Schema Tree.

We assume you already know how to use the EER Modeling and therefore we proceed with the Admin.
Admin
The Admin also features a very clear design that makes it easy to access the desired features.
Admin Tutorial

After opening the Admin you can see the Server Status panel at the top. Use this panel to verify the current server status and to check the current Server Health graphs.
Select the corresponding Configuration tab that fits your current task.
After selecting the correct Configuration tab perform the necessary actions on the Configuration page.

After studying this tutorial you should have a basic idea how the use MySQL Workbench 5.2 most efficiently. Please write a comment if you have a tip for other users.</description>
    <content:encoded><![CDATA[<p>MySQL Workbench 5.2 introduces a lot of new functionality and therefore this short tutorial will help you to get started quickly.</p>
<h2>The Home Screen</h2>
<p>The most prominent new addition in respect to previous Workbench releases is the new Home Screen. It allows you to access the main features of Workbench in a nice and easy way and is divided into 4 parts.</p>
<p>The upper Workbench Central panel features a few Links and Action Buttons to quickly access common resources.</p>
<p>The lower Workspace panel shows the main feature sets, grouped horizontally.</p>
<ul>
<li><strong>SQL Development</strong> allows editing and execution of SQL queries and scripts, create or alter database objects and edit table data.</li>
<li><strong>Data Modeling</strong> covers the EER Modeling functionality you might already be familiar with from previous MySQL Workbench releases.</li>
<li><strong>Server Administration</strong> offers administrative tasks like starting/stopping the server, edit the database server configuration, create user accounts, do data dumps and much more.</li>
</ul>
<p>To quickly get started, use the following steps.</p>
<div><a href="http://wb.fabforce.eu/wp-content/uploads/WB_HomeScreenTutorial.png"><img class="size-full wp-image-409" title="WB_HomeScreenTutorial_small" src="http://wb.fabforce.eu/wp-content/uploads/WB_HomeScreenTutorial_small.png" border="0" alt="Home Screen Tutorial" width="570" height="455" /></a><p>Home Screen Tutorial</p></div>
<ol>
<li><strong>Create a new Connection</strong> &#8211; Before you can start any other tasks &#8212; using the SQL Editor, forward engineering your model, or managing your database server, you need to create a new Database Connection. You can do that by using the <em>New Connection</em> Wizard or &#8211; if you are an advanced user &#8211; by using the <em>Manage Connections</em> dialog.You will have to enter the usual connection parameters, like IP address and port the server is running on as well as your username and password.</li>
<li><strong>Open Editor</strong> &#8211; After you have created a new connection, it will be displayed in the list of available Database Connections. Simply double-click on the list entry to open a SQL Editor and start querying.</li>
<li><strong>Create a new model </strong>- If you want to start your work by designing a visual database design first, click the <em>Create new EER Model</em> action item. An empty model will be created for you, only featuring the my_db schema which you can easily rename to the desired name.</li>
<li><strong>Create a New Server Profile</strong> &#8211; In order to administer your database server you have to register it within MySQL Workbench first.  Use the <em>New Server Profile</em> Wizard or &#8211; if you are an advanced user &#8211; use the <em>Manage Server Profiles</em> dialog.</li>
<li><strong>Open Admin</strong> &#8211; Once the new Server Profile is registered and appears in the list box you can double-click it to open the Admin.</li>
</ol>
<p>Let&#8217;s take a closer look at the SQL Editor.</p>
<h2>SQL Editor</h2>
<p>The SQL Editor features a straight forward interface that gets you going, immediately.</p>
<div><a href="http://wb.fabforce.eu/wp-content/uploads/WB_SQLEditorTutorial.png"><img class="size-full wp-image-411" title="WB_SQLEditorTutorial_small" src="http://wb.fabforce.eu/wp-content/uploads/WB_SQLEditorTutorial_small.png" border="0" alt="SQL Editor Tutorial" width="570" height="455" /></a><p>SQL Editor Tutorial</p></div>
<ol>
<li> To give you instant access to your database objects we have added the Live Schema Overview panel to the SQL Editor. To start editing the data of an existing table, insert new data rows or manipulate existing data, simply double-click on the table.</li>
<li>You can also modify the table structure by right-clicking on the table and select Alter &#8230; . This also works for any other database object.</li>
<li>Enter your SQL queries and scripts on the SQL Statement panel. You can execute a single or multiple statements at the same time by clicking the Execution Arrow toolbar icon or hitting Ctrl+Return on the keyboard.</li>
<li>If you create new objects by using SQL statements make sure to click the Refresh toolbar icon to update the Live Schema Overview panel and the Schema Tree.</li>
</ol>
<p>We assume you already know how to use the EER Modeling and therefore we proceed with the Admin.</p>
<h2>Admin</h2>
<p>The Admin also features a very clear design that makes it easy to access the desired features.</p>
<div><a href="http://wb.fabforce.eu/wp-content/uploads/WB_AdminTutorial.png"><img class="size-full wp-image-407" title="WB_AdminTutorial_small" src="http://wb.fabforce.eu/wp-content/uploads/WB_AdminTutorial_small.png" border="0" alt="Admin Tutorial" width="570" height="455" /></a><p>Admin Tutorial</p></div>
<ol>
<li>After opening the Admin you can see the Server Status panel at the top. Use this panel to verify the current server status and to check the current Server Health graphs.</li>
<li>Select the corresponding Configuration tab that fits your current task.</li>
<li>After selecting the correct Configuration tab perform the necessary actions on the Configuration page.</li>
</ol>
<p>After studying this tutorial you should have a basic idea how the use MySQL Workbench 5.2 most efficiently. Please write a comment if you have a tip for other users.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22303&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22303&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 19:30:38 +0000</pubDate>
    <dc:creator>The Workbench Team</dc:creator>
    <category>Linux</category>
    <category>Mac</category>
    <category>Tutorial</category>
    <category>Windows</category>
  </item>

  <item>
    <title>MySQL Workbench 5.2.8 Beta Available</title>
    <guid isPermaLink="false">http://wb.mysql.com/?p=413</guid>
    <link>http://wb.mysql.com/?p=413</link>
    <description>Dear MySQL Users,
We are proud to announce that we have reached the Beta 1 for MySQL Workbench 5.2. Beta 1 is “functionally complete” and shows the new features for the upcoming version of Workbench GUI product.
The team has worked very hard to reach the goal of including all our new features within this first public beta version. We know there is still a lot of fine tuning and stabilization to be done over the coming weeks to get it solid on all platforms, but this release marks an important milestone.  Your beta feedback is key to this.
MySQL Workbench 5.2 Beta 1 provides:

Data Modeling
Query (upgrade from MySQL Query Browser)
Admin (upgrade from MySQL Administrator)

If you are a current user of MySQL Query Browser or MySQL Administrator, we look forward to your feedback on all the new capabilities we are delivering in a single unified MySQL Workbench
As always, you will find binaries for the various platforms on our download pages.
Please get your copy from our Download
http://dev.mysql.com/downloads/workbench/
To get started quickly, please take a look at this short tutorial.
MySQL Workbench 5.2 Beta Tutorial
http://wb.mysql.com/?p=406
Please be aware that this release is the initial a beta version – so please don’t use it on your production servers! Also note, MySQL Workbench files saved with version 5.2 cannot be opened with previous versions of our program.
The files for several platforms have been pushed to our main server and
should be available on our mirrors.
Blog postings and general information &amp;#8211; including build instructions for Linux &amp;#8211; can be found on our Workbench Developer Central site.
Workbench Developer Central
http://wb.mysql.com
If you need any additional info or help please get in touch with us.
Post in our forums, leave comments on our blog pages or if you want to talk to us directly you can visit us on our IRC channel #workbench on irc.freenode.net.
Again, thank you for trying out the Workbench beta, we look forward to your feedback and bug reports.
- The MySQL Workbench Team</description>
    <content:encoded><![CDATA[<p>Dear MySQL Users,</p>
<p>We are proud to announce that we have reached the Beta 1 for MySQL Workbench 5.2. Beta 1 is “functionally complete” and shows the new features for the upcoming version of Workbench GUI product.</p>
<p>The team has worked very hard to reach the goal of including all our new features within this first public beta version. We know there is still a lot of fine tuning and stabilization to be done over the coming weeks to get it solid on all platforms, but this release marks an important milestone.  Your beta feedback is key to this.</p>
<p>MySQL Workbench 5.2 Beta 1 provides:</p>
<ol>
<li>Data Modeling</li>
<li>Query (upgrade from MySQL Query Browser)</li>
<li>Admin (upgrade from MySQL Administrator)</li>
</ol>
<p>If you are a current user of MySQL Query Browser or MySQL Administrator, we look forward to your feedback on all the new capabilities we are delivering in a single unified MySQL Workbench</p>
<p>As always, you will find binaries for the various platforms on our download pages.</p>
<p>Please get your copy from our Download</p>
<p><a href="http://dev.mysql.com/downloads/workbench/" target="_blank">http://dev.mysql.com/downloads/workbench/</a></p>
<p>To get started quickly, please take a look at this short tutorial.</p>
<p>MySQL Workbench 5.2 Beta Tutorial</p>
<p><a href="http://wb.mysql.com/?p=406">http://wb.mysql.com/?p=406</a></p>
<p>Please be aware that this release is the initial a beta version – so please don’t use it on your production servers! Also note, MySQL Workbench files saved with version 5.2 cannot be opened with previous versions of our program.</p>
<p>The files for several platforms have been pushed to our main server and<br />
should be available on our mirrors.</p>
<p>Blog postings and general information &#8211; including build instructions for Linux &#8211; can be found on our Workbench Developer Central site.</p>
<p>Workbench Developer Central</p>
<p><a href="http://wb.mysql.com">http://wb.mysql.com</a></p>
<p>If you need any additional info or help please get in touch with us.<br />
Post in our forums, leave comments on our blog pages or if you want to talk to us directly you can visit us on our IRC channel #workbench on irc.freenode.net.</p>
<p>Again, thank you for trying out the Workbench beta, we look forward to your feedback and bug reports.</p>
<p>- The MySQL Workbench Team</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22304&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22304&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 19:19:06 +0000</pubDate>
    <dc:creator>The Workbench Team</dc:creator>
    <category>Announcements</category>
    <category>Linux</category>
    <category>Mac</category>
    <category>Windows</category>
  </item>

  <item>
    <title>Free Webinar: Migrating from Microsoft Access to MySQL</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-3684039529233307799.post-8744916849343922802</guid>
    <link>http://sqlnow.blogspot.com/2009/11/free-webinar-migrating-from-microsoft.html</link>
    <description>Join us for a free webinar tomorrow where we will present the fundamentals of migrating a sample application from Microsoft Access to a MySQL back end. We will be giving the presentation twice, at 14:00 Central for EMEA and 10:00 Pacific for North America. To register, visit here.</description>
    <content:encoded><![CDATA[Join us for a free webinar tomorrow where we will present the fundamentals of migrating a sample application from Microsoft Access to a MySQL back end. We will be giving the presentation twice, at 14:00 Central for EMEA and 10:00 Pacific for North America. To register, visit <a href="http://www.mysql.com/news-and-events/web-seminars/index.html">here</a>.<div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/3684039529233307799-8744916849343922802?l=sqlnow.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22302&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22302&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 15:33:00 +0000</pubDate>
    <dc:creator>Jimmy Guerrero</dc:creator>
    <category>migration</category>
    <category>mysql</category>
    <category>access</category>
    <category>windows</category>
  </item>

  <item>
    <title>Macro Support in new Drizzle Client Console?</title>
    <guid isPermaLink="false">http://jpipes.com/index.php?/archives/312-guid.html</guid>
    <link>http://jpipes.com/index.php?/archives/312-Macro-Support-in-new-Drizzle-Client-Console.html</link>
    <description>
Hi all!


I've been reading through the requested features for the new client on the wiki here:


Proposed Client Features
BOOTS Console API Design


I think all the stuff on that link is excellent so far.  I'd also like to request a feature that I think will be a really cool timesaver for DBAs and developers using Drizzle.


Macro Support


Remember, &quot;way back when&quot; you used Microsoft Excel and were able to start recording your actions, then when you stopped recording, Excel would store a &quot;macro&quot; of your actions that you could subsequently replay?


I think this would be incredibly useful for folks who do repetitive work in the console.


Sure, I know, I know...the first reaction folks will say is &quot;but HEY, you guys removed stored procedures!&quot;  Yeah, yeah... but the feature I'm proposing here is different from stored procedures in the following ways:


It's entirely client-side.  There is no server-side storage/cache, processing, parsing, or anything.
It's not limited to a small subset of SQL that stored procedures (at least in MySQL) are currently limited to.  Anything the new client can do would be able to go into a macro.
Since the client is in Python, the macros are themselves re-writable in a scripting language.  This gives the recorded macros incredible flexibility.
No fussing with SQL stored procedure permissions at runtime (you know, the silly INVOKER/DEFINER crap)
Ability to interact with result sets in the macro.  Just try doing that easily in a SQL stored procedure.  Using CURSORs is incredibly clunk and ugly.  Applying a Python function or closure/lambda on each of a result set is elegant and easy.


Imagine the following rough example interface...


drizzle&gt; RECORD MACRO &quot;sales_report_with_email&quot; (to_email);
macro recording started.

drizzle&gt; mode python;
in python mode.

python&gt; import datetime
python&gt; today= datetime.datetime.now().isoformat()
python&gt; filename= &quot;%s-%s-%s&quot; % (&quot;sales&quot;, to_email, today)
python&gt; Ctrl-D

drizzle&gt; SELECT * FROM sales
         WHERE manager = @to_email; &gt; csv(@filename);
drizzle&gt; mode python;
In python mode.

python&gt; report_txt= open(filename, &quot;r+b&quot;).read()
python&gt; import smtplib
python&gt; mailserver = smtplib.SMTP('localhost')
python&gt; mailserver.sendmail('theboss@company.com', to_email, report_txt)
python&gt; mailserver.quit()
python&gt; print &quot;Mail sent to %s\n&quot; % to_email
python&gt; Ctrl-D

drizzle&gt; STOP MACRO;
Macro &quot;sales_report_with_email&quot; saved.

drizzle&gt; macro(&quot;sales_report_with_email&quot;, &quot;myboss@company.com&quot;);
Mail sent to myboss@company.com


Pretty powerful, eh?


If you follow the flow above, you will notice the only real trick to solve is passing the macro's arguments into the console's variable array, and from the console's variable array into the Python interpreter's variable scope.  But this is a fairly simple problem to solve...


Thoughts?  Suggestions?  If you've got comments, please feel free to share here, or on the Drizzle Discussion mailing list, or even update the wiki pages posted above.  Thanks! 
</description>
    <content:encoded><![CDATA[<p>
Hi all!
</p>
<p>
I've been reading through the requested features for the new client on the wiki here:
</p>
<ul>
<li><a href="http://drizzle.org/wiki/Proposed_Client_Features">Proposed Client Features</a></li>
<li><a href="http://drizzle.org/wiki/Client/Boots_API_Design_Concept">BOOTS Console API Design</a></li>
</ul>
<p>
I think all the stuff on that link is excellent so far.  I'd also like to request a feature that I think will be a really cool timesaver for DBAs and developers using Drizzle.
</p>
<p>
<strong><em>Macro Support</em></strong>
</p>
<p>
Remember, "way back when" you used Microsoft Excel and were able to start recording your actions, then when you stopped recording, Excel would store a "macro" of your actions that you could subsequently replay?
</p>
<p>
I think this would be incredibly useful for folks who do repetitive work in the console.
</p>
<p>
Sure, I know, I know...the first reaction folks will say is "<em>but HEY, you guys removed stored procedures!</em>"  Yeah, yeah... but the feature I'm proposing here is different from stored procedures in the following ways:
</p>
<ol>
<li><strong>It's entirely client-side</strong>.  There is no server-side storage/cache, processing, parsing, or anything.</li>
<li><strong>It's not limited to a small subset of SQL</strong> that stored procedures (at least in MySQL) are currently limited to.  Anything the new client can do would be able to go into a macro.</li>
<li>Since the client is in Python, <strong>the macros are themselves re-writable in a scripting language</strong>.  This gives the recorded macros incredible flexibility.</li>
<li><strong>No fussing with SQL stored procedure permissions</strong> at runtime (you know, the silly INVOKER/DEFINER crap)</li>
<li><strong>Ability to interact with result sets in the macro</strong>.  Just try doing that easily in a SQL stored procedure.  Using <tt>CURSOR</tt>s is incredibly clunk and ugly.  Applying a Python function or closure/lambda on each of a result set is elegant and easy.</li>
</ol>
<p>
Imagine the following rough example interface...
</p>
<pre>
drizzle> RECORD MACRO "sales_report_with_email" (to_email);
macro recording started.

drizzle> mode python;
in python mode.

python> import datetime
python> today= datetime.datetime.now().isoformat()
python> filename= "%s-%s-%s" % ("sales", to_email, today)
python> Ctrl-D

drizzle> SELECT * FROM sales
         WHERE manager = @to_email; > csv(@filename);
drizzle> mode python;
In python mode.

python> report_txt= open(filename, "r+b").read()
python> import smtplib
python> mailserver = smtplib.SMTP('localhost')
python> mailserver.sendmail('theboss@company.com', to_email, report_txt)
python> mailserver.quit()
python> print "Mail sent to %s\n" % to_email
python> Ctrl-D

drizzle> STOP MACRO;
Macro "sales_report_with_email" saved.

drizzle> macro("sales_report_with_email", "myboss@company.com");
Mail sent to myboss@company.com
</pre>
<p>
Pretty powerful, eh?
</p>
<p>
If you follow the flow above, you will notice the only real trick to solve is passing the macro's arguments into the console's variable array, and from the console's variable array into the Python interpreter's variable scope.  But this is a fairly simple problem to solve...
</p>
<p>
Thoughts?  Suggestions?  If you've got comments, please feel free to share here, or on the <a href="https://launchpad.net/~drizzle-discuss" title="Drizzle Discuss">Drizzle Discussion</a> mailing list, or even update the wiki pages posted above.  Thanks! <img src="http://jpipes.com/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" />
</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22300&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22300&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 14:36:00 +0000</pubDate>
    <dc:creator>Jay Pipes</dc:creator>
    <category>MySQL</category>
    <category>Drizzle</category>
    <category>Python</category>
  </item>

  <item>
    <title>Matinée Optimisation MySQL</title>
    <guid isPermaLink="false">http://blogs.sun.com/partnertech/entry/matin%C3%A9e_optimisation_mysql</guid>
    <link>http://blogs.sun.com/partnertech/entry/matin%C3%A9e_optimisation_mysql</link>
    <description>Il reste encore quelques places pour cette matinée dédiée à l'optimisation des performances MySQL. 
  Date : 24 novembre 2009
Lieu : Centre de Conférences, Capital 8, 32 Monceau, 75008 Paris.
Accueil : 9h00 (petit déjeuner et café seront offerts).
Prix : Cette matinée est gratuite !
 Session 1 : 9h30-10h45
 
   
     Architecture MySQL : Parsing, exécution, optimizer,
query cache, binlog…etc
 
     Architecture Innodb : Clustered index, bufferpool, hash
index, insert buffer, locking model, MVCC, recovery log, checkpoint…etc. Comparaison avec les autres moteurs de
stockage (PBXT, MySQL Cluster) et bases de données (PostgreSQL, Oracle ..).
 
   
   Pause/Café : 10h45-11h00.
 Session 2 : 11h00-12h30
  
   
     Évolutions récentes : Google SMP patches,&amp;nbsp; XtraDB, Oracle
innodb plugin 1.0.4
 
     Apports de MySQL 5.4 
     Améliorations à venir :&amp;nbsp;
Ahead flushing / Adaptive checkpoint,&amp;nbsp; Purge lag / Purge
thread, Splitted locks, etc…Explication technique des améliorations et des gains de performance obtenus.
 
   
   Nous parlerons aussi de MySQL Enterprise et du MySQL Query 
analyzer qui vous permet d’optimiser un environnement MySQL.
 Cette matinée se veut conviviale et interactive avec Q&amp;amp;A.
 Le nombre de places étant limité, inscrivez-vous dès aujourd’hui 
auprès de olivier.beutels@sun.com</description>
    <content:encoded><![CDATA[<p>Il reste encore quelques places pour cette matinée dédiée à l'optimisation des performances MySQL.</p> 
  <p><b>Date</b> : 24 novembre 2009
<br /><b>Lieu</b> : Centre de Conférences, Capital 8, 32 Monceau, 75008 Paris.
<br /><b>Accueil</b> : 9h00 (petit déjeuner et café seront offerts).
<br /><b>Prix</b> : Cette matinée est gratuite !
<br /> <br /><b>Session 1</b> : 9h30-10h45
<br /></p> 
  <ul> 
    <li> <b>Architecture MySQL</b> : Parsing, exécution, optimizer,
query cache, binlog…etc
</li> 
    <li> <b>Architecture Innodb</b> : Clustered index, bufferpool, hash
index, insert buffer, locking model, MVCC, recovery log, checkpoint…etc. Comparaison avec les autres moteurs de
stockage (PBXT, MySQL Cluster) et bases de données (PostgreSQL, Oracle ..).
</li> 
  </ul> 
  <p> <br />Pause/Café : 10h45-11h00.
<br /> <br /><b>Session 2</b> : 11h00-12h30
<br /> <br /></p> 
  <ul> 
    <li> <b>Évolutions récentes</b> : Google SMP patches,&nbsp; XtraDB, Oracle
innodb plugin 1.0.4
</li> 
    <li> <b>Apports de MySQL 5.4</b></li> 
    <li> <b>Améliorations à venir</b> :&nbsp;
Ahead flushing / Adaptive checkpoint,&nbsp; Purge lag / Purge
thread, Splitted locks, etc…Explication technique des améliorations et des gains de performance obtenus.
</li> 
  </ul> 
  <p> <br />Nous parlerons aussi de MySQL Enterprise et du MySQL Query 
analyzer qui vous permet d’optimiser un environnement MySQL.
<br /> <br />Cette matinée se veut conviviale et interactive avec Q&amp;A.
<br /> <br />Le nombre de places étant limité, inscrivez-vous dès aujourd’hui 
auprès de <a href="mailto:olivier.beutels@sun.com">olivier.beutels@sun.com</a><br /></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22301&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22301&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 14:23:34 +0000</pubDate>
    <dc:creator>Thierry Manfé</dc:creator>
    <category>Français</category>
  </item>

  <item>
    <title>Code Organization Dilemma</title>
    <guid isPermaLink="false">http://brian.moonspot.net/php-code-organization</guid>
    <link>http://brian.moonspot.net/php-code-organization</link>
    <description>So, we have been building up our code library at dealnews for 9 years. It was started at
the end of PHP3 and the beginning of PHP4. So, we did not have
autoloading, static functions, and all that jazz. Classes had lots
of overhead in early PHP4 so we started down a pure procedural road
in 2000. And for a long time, it was very maintainable. We had 2 or
3 developers for most of this time. We now have 5 or 6 depending on
whether we have contractors. There are starting to be too many
files and too many functions. We find ourselves adding new files
when some new function is created instead of adding it to an
existing file because we don't want to have huge files with 100
functions in them. File names and function names are getting longer
and more ambiguous. For example, we have a file called
url_functions.php. It contains functions to generate URLs for
different types of pages on the site, functions to fetch URLs from
the web and functions to parse URLs from an article. Those probably
don't all belong in one file. But, they got nickle and dimed in
there over time. So, now, we are inclined to not add anything to
that file and make new files for new semi-URL related functions.
Ugh.

It is time to start thinkinb about a reorganization. There are
1,900+ functions in 400+ files in our code library. This is just
our library. This does not include the code that actually builds a
page and generates output. It does not include our cron jobs or
system administration scripts. Yeah, that is a lot. So, where do we
go from here? Some things are easy to do. For example, we have a
file called string.php. Most all the functions in that file can
easily be moved a String class with static functions that can be
accessed via an autoloader.

Then we have the various ways we deal with the articles on the web
site. I have written

about our front end vs. back end system before. What this means
for our code base is that we have two ways to deal with an article.
One is in our highly relational backend system. The other is in our
optimized front end database servers. So, one Article object won't
really do. We already have an Article object that serves as an ORM
interface for the backend. To access the front end data, we
currently have a library of functions (fetch_article for a single,
fetch_articles for a set, etc.) but it does not fit with an
autoloading environment. It also is not related to the object (the
article) and is associated with where the data is stored. New
developers don't grok the server infrastructure, so the code
organization may not make sense to them. We have about 10 different
objects that need both a back end and front end interface.

On the other hand, I really don't want to end up with a class named
FrontEndArticle and BackEndArticle. Much less do we want to have
stuff like BackEnd_Article where the file is actually in
BackEnd/Article.php somewhere. The verbosity becomes overwhelming
and hard to read, IMO.

So, what are others doing with huge code bases? I see lots of
projects with 100 or so functions/methods in 20-30 files.&amp;nbsp;
Frameworks have it easy because they don't have a CEO that wants
something on this one page to be different than it is on every
other page where that data is used. We have to deal with those
types of hacks in an elegant way that can be maintained.</description>
    <content:encoded><![CDATA[So, we have been building up our code library at <a href="http://dealnews.com/">dealnews</a> for 9 years. It was started at
the end of PHP3 and the beginning of PHP4. So, we did not have
autoloading, static functions, and all that jazz. Classes had lots
of overhead in early PHP4 so we started down a pure procedural road
in 2000. And for a long time, it was very maintainable. We had 2 or
3 developers for most of this time. We now have 5 or 6 depending on
whether we have contractors. There are starting to be too many
files and too many functions. We find ourselves adding new files
when some new function is created instead of adding it to an
existing file because we don't want to have huge files with 100
functions in them. File names and function names are getting longer
and more ambiguous. For example, we have a file called
url_functions.php. It contains functions to generate URLs for
different types of pages on the site, functions to fetch URLs from
the web and functions to parse URLs from an article. Those probably
don't all belong in one file. But, they got nickle and dimed in
there over time. So, now, we are inclined to not add anything to
that file and make new files for new semi-URL related functions.
Ugh.<br>
<br>
It is time to start thinkinb about a reorganization. There are
1,900+ functions in 400+ files in our code library. This is just
our library. This does not include the code that actually builds a
page and generates output. It does not include our cron jobs or
system administration scripts. Yeah, that is a lot. So, where do we
go from here? Some things are easy to do. For example, we have a
file called string.php. Most all the functions in that file can
easily be moved a String class with static functions that can be
accessed via an autoloader.<br>
<br>
Then we have the various ways we deal with the articles on the web
site. I have <a href="http://brian.moonspot.net/2007/06/23/caching-and-patience/">written</a>
<a href="http://brian.moonspot.net/2007/08/29/out-with-cluster-hello-replication/">
about</a> our front end vs. back end system before. What this means
for our code base is that we have two ways to deal with an article.
One is in our highly relational backend system. The other is in our
optimized front end database servers. So, one Article object won't
really do. We already have an Article object that serves as an ORM
interface for the backend. To access the front end data, we
currently have a library of functions (fetch_article for a single,
fetch_articles for a set, etc.) but it does not fit with an
autoloading environment. It also is not related to the object (the
article) and is associated with where the data is stored. New
developers don't grok the server infrastructure, so the code
organization may not make sense to them. We have about 10 different
objects that need both a back end and front end interface.<br>
<br>
On the other hand, I really don't want to end up with a class named
FrontEndArticle and BackEndArticle. Much less do we want to have
stuff like BackEnd_Article where the file is actually in
BackEnd/Article.php somewhere. The verbosity becomes overwhelming
and hard to read, IMO.<br>
<br>
So, what are others doing with huge code bases? I see lots of
projects with 100 or so functions/methods in 20-30 files.&nbsp;
Frameworks have it easy because they don't have a CEO that wants
something on this one page to be different than it is on every
other page where that data is used. We have to deal with those
types of hacks in an elegant way that can be maintained.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22299&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22299&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 14:00:00 +0000</pubDate>
    <dc:creator>Brian Moon</dc:creator>
    <category>php</category>
  </item>

  <item>
    <title>PHP's MySQLi extension: Storing and retrieving blobs</title>
    <guid isPermaLink="false">http://blogs.sun.com/oswald/entry/php_s_mysqli_extension_storing</guid>
    <link>http://blogs.sun.com/oswald/entry/php_s_mysqli_extension_storing</link>
    <description>There are a lot of tutorial out there describing how to use PHP's classic MySQL extension to store and retrieve blobs. There are also many tutorials how to use PHP's MySQLi extension to use prepared statements to fight SQL injections in your web application.  But there are no tutorials about using MySQLi with any blob data at all.

Until today... ;)

Preparing the database

Okay, first I need a table to store my blobs. In this example I'll store images in my database because images usually look better in a tutorial than some random raw data.
mysql&amp;gt; CREATE TABLE images (
       id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
       image MEDIUMBLOB NOT NULL,
       PRIMARY KEY (id)
       );
Query OK, 0 rows affected (0.02 sec)


In general you don't want to store images in a relational database. But that's another discussion for another day.

Storing the blob

To make a long story short, here's the code to store a blob using MySQLi:

&amp;lt;?php
	$mysqli=mysqli_connect('localhost','user','password','db');

	if (!$mysqli)
		die(&quot;Can't connect to MySQL: &quot;.mysqli_connect_error());

	$stmt = $mysqli-&gt;prepare(&quot;INSERT INTO images (image) VALUES(?)&quot;);
	$null = NULL;
	$stmt-&gt;bind_param(&quot;b&quot;, $null);

	$stmt-&gt;send_long_data(0, file_get_contents(&quot;osaka.jpg&quot;));

	$stmt-&gt;execute();
?&amp;gt;

If you already used MySQLi, most of the above should look familiar to you. I highlighted two pieces of code, which I think are worth looking at:

The $null variable is needed, because bind_param() always wants a variable reference for a given parameters. In this case the &quot;b&quot; (as in blob) parameter.  So $null is just a dummy, to make the syntax work.
In the next step I need to &quot;fill&quot; my blob parameter with the actual data. This is done by send_long_data(). The first parameter of this method indicates which parameter to associate the data with. Parameters are numbered beginning with 0. The second parameter of send_long_data() contains the actual data to be stored.



While using send_long_data(), please make sure that the blob isn't bigger than MySQL's max_allowed_packet:
mysql&gt; SHOW VARIABLES LIKE 'max_allowed_packet';
+--------------------+----------+
| Variable_name      | Value    |
+--------------------+----------+
| max_allowed_packet | 16776192 | 
+--------------------+----------+
1 row in set (0.00 sec)

If your data exceeds max_allowed_packet, you probably don't get any errors returned from send_long_data() or execute(). The saved blob is just corrupt!

Simply raise the value max_allowed_packet to whatever you'll need. If you're not able to change MySQL's configuration, you'll need to send the data in smaller chunks:

	$fp = fopen(&quot;osaka.jpg&quot;, &quot;r&quot;);
	while (!feof($fp)) 
	{
 	   $stmt-&gt;send_long_data(0, fread($fp, 16776192));
	}


Usually the default value of 16M should be a good start.

Retrieving the blob

Getting the blob data out of the database is quite simple and follows the usual way of MySQLi:

&amp;lt;?php
	$mysqli=mysqli_connect('localhost','user','password','db');

	if (!$mysqli)
		die(&quot;Can't connect to MySQL: &quot;.mysqli_connect_error());

	$id=1;  
	$stmt = $mysqli-&gt;prepare(&quot;SELECT image FROM images WHERE id=?&quot;); 
	$stmt-&gt;bind_param(&quot;i&quot;, $id);

	$stmt-&gt;execute();
	$stmt-&gt;store_result();

	$stmt-&gt;bind_result($image);
	$stmt-&gt;fetch();

	header(&quot;Content-Type: image/jpeg&quot;);
	echo $image; 
?&amp;gt;

Connect to the database, prepare the SQL statement, bind the parameter(s), execute the statement, bind the result to a variable, and fetch the actual data from the database. In this case there is no need to worry about max_allowed_packet. MySQLi will do all the work:
 


By the way...

If you want to insert a blob from the command line using MySQL monitor, you can use LOAD_FILE() to fetch the data from a file:
mysql&amp;gt; INSERT INTO images (image) VALUES( LOAD_FILE(&quot;/home/oswald/osaka.jpg&quot;) );

Be aware that also in this case max_allowed_packet limits the amount of data you're able to send to the database:

mysql&gt; SHOW VARIABLES LIKE 'max_allowed_packet';
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| max_allowed_packet | 7168  | 
+--------------------+-------+
1 row in set (0.00 sec)

mysql&gt; INSERT INTO images (image) VALUES( LOAD_FILE(&quot;/home/oswald/osaka.jpg&quot;) );
ERROR 1048 (23000): Column 'image' cannot be null
mysql&gt; SET @@max_allowed_packet=16777216;
Query OK, 0 rows affected (0.00 sec)

mysql&gt; SHOW VARIABLES LIKE 'max_allowed_packet';
+--------------------+----------+
| Variable_name      | Value    |
+--------------------+----------+
| max_allowed_packet | 16777216 | 
+--------------------+----------+
1 row in set (0.00 sec)

mysql&gt; INSERT INTO images (image) VALUES( LOAD_FILE(&quot;/home/oswald/osaka.jpg&quot;) );
Query OK, 1 row affected (0.03 sec)</description>
    <content:encoded><![CDATA[<p>There are a lot of tutorial out there describing how to use PHP's classic MySQL extension to store and retrieve blobs. There are also many tutorials how to use PHP's MySQLi extension to use prepared statements to fight SQL injections in your web application.  But there are no tutorials about using MySQLi with any blob data at all.<p>

<p>Until today... ;)</p>

<h3>Preparing the database</h3>

<p>Okay, first I need a table to store my blobs. In this example I'll store images in my database because images usually look better in a tutorial than some random raw data.</p>
<pre>mysql&gt; <strong>CREATE TABLE images (</strong>
       <strong>id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,</strong>
       <strong>image MEDIUMBLOB NOT NULL,</strong>
       <strong>PRIMARY KEY (id)</strong>
       <strong>);</strong>
Query OK, 0 rows affected (0.02 sec)
</pre>

<p>In general you don't want to store images in a relational database. But that's another discussion for another day.</p>

<h3>Storing the blob</h3>

<p>To make a long story short, here's the code to store a blob using MySQLi:</p>

<pre>&lt;?php
	$mysqli=mysqli_connect('localhost','user','password','db');

	if (!$mysqli)
		die("Can't connect to MySQL: ".mysqli_connect_error());

	$stmt = $mysqli->prepare("INSERT INTO images (image) VALUES(?)");
	<strong>$null = NULL;</strong>
	$stmt->bind_param("b", <strong>$null</strong>);

	<strong>$stmt->send_long_data(0, file_get_contents("osaka.jpg"));</strong>

	$stmt->execute();
?&gt;</pre>

<p>If you already used MySQLi, most of the above should look familiar to you. I highlighted two pieces of code, which I think are worth looking at:</p>
<ol>
<li><p>The <em>$null</em> variable is needed, because <em>bind_param()</em> always wants a variable reference for a given parameters. In this case the "b" (as in blob) parameter.  So <em>$null</em> is just a dummy, to make the syntax work.</p>
<li><p>In the next step I need to "fill" my blob parameter with the actual data. This is done by <em>send_long_data()</em>. The first parameter of this method indicates which parameter to associate the data with. Parameters are numbered beginning with 0. The second parameter of <em>send_long_data()</em> contains the actual data to be stored.</p>
</ol>


<p>While using <em>send_long_data()</em>, please make sure that the blob isn't bigger than MySQL's <em>max_allowed_packet</em>:</p>
<pre>mysql> <strong>SHOW VARIABLES LIKE 'max_allowed_packet';</strong>
+--------------------+----------+
| Variable_name      | Value    |
+--------------------+----------+
| max_allowed_packet | 16776192 | 
+--------------------+----------+
1 row in set (0.00 sec)</pre>

<p>If your data exceeds <em>max_allowed_packet</em>, you probably don't get any errors returned from <em>send_long_data()</em> or <em>execute()</em>. The saved blob is just corrupt!</p>

<p>Simply raise the value <em>max_allowed_packet</em> to whatever you'll need. If you're not able to change MySQL's configuration, you'll need to send the data in smaller chunks:</p>

<pre>	$fp = fopen("osaka.jpg", "r");
	while (!feof($fp)) 
	{
 	   $stmt->send_long_data(0, fread($fp, 16776192));
	}
</pre>

<p>Usually the default value of 16M should be a good start.</p>

<h3>Retrieving the blob</h3>

<p>Getting the blob data out of the database is quite simple and follows the usual way of MySQLi:</p>

<pre>&lt;?php
	$mysqli=mysqli_connect('localhost','user','password','db');

	if (!$mysqli)
		die("Can't connect to MySQL: ".mysqli_connect_error());

	$id=1;  
	$stmt = $mysqli->prepare("SELECT image FROM images WHERE id=?"); 
	$stmt->bind_param("i", $id);

	$stmt->execute();
	$stmt->store_result();

	$stmt->bind_result($image);
	$stmt->fetch();

	header("Content-Type: image/jpeg");
	echo $image; 
?&gt;</pre>

<p>Connect to the database, prepare the SQL statement, bind the parameter(s), execute the statement, bind the result to a variable, and fetch the actual data from the database. In this case there is no need to worry about <em>max_allowed_packet</em>. MySQLi will do all the work:</p>
 
<img src="http://blogs.sun.com/oswald/resource/_3925128491.jpg" alt="3925128491.jpg" border="0" width="600" height="399" />

<h3>By the way...</h3>

<p>If you want to insert a blob from the command line using MySQL monitor, you can use <em>LOAD_FILE()</em> to fetch the data from a file:</p>
<pre>mysql&gt; <strong>INSERT INTO images (image) VALUES( LOAD_FILE("/home/oswald/osaka.jpg") );</strong></pre>

<p>Be aware that also in this case <em>max_allowed_packet</em> limits the amount of data you're able to send to the database:</p>

<pre>mysql> <strong>SHOW VARIABLES LIKE 'max_allowed_packet';</strong>
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| max_allowed_packet | 7168  | 
+--------------------+-------+
1 row in set (0.00 sec)

mysql> <strong>INSERT INTO images (image) VALUES( LOAD_FILE("/home/oswald/osaka.jpg") );</strong>
ERROR 1048 (23000): Column 'image' cannot be null
mysql> <strong>SET @@max_allowed_packet=16777216;</strong>
Query OK, 0 rows affected (0.00 sec)

mysql> <strong>SHOW VARIABLES LIKE 'max_allowed_packet';</strong>
+--------------------+----------+
| Variable_name      | Value    |
+--------------------+----------+
| max_allowed_packet | 16777216 | 
+--------------------+----------+
1 row in set (0.00 sec)

mysql> <strong>INSERT INTO images (image) VALUES( LOAD_FILE("/home/oswald/osaka.jpg") );</strong>
Query OK, 1 row affected (0.03 sec)<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22296&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22296&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 10:35:20 +0000</pubDate>
    <dc:creator>Kai Seidler</dc:creator>
    <category>MySQL</category>
  </item>

  <item>
    <title>5.0.87-build20 Percona binaries</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1751</guid>
    <link>http://www.mysqlperformanceblog.com/2009/11/18/5-0-87-build20-percona-binaries/</link>
    <description>Dear Community,
We are pleased to present the 20th build of MySQL server with Percona patches.
Comparing to the previous release it has following new features:

The build is based on MySQL-5.0.87
innodb_rw_lock.patch is ported from InnoDB Plugin 1.0.3
To be compatible with RedHat RPM repository, the naming scheme has changed to
&amp;lt;rpm name&amp;gt;-&amp;lt;mysql version&amp;gt;-&amp;lt;percona build version&amp;gt;.&amp;lt;buildnumber&amp;gt;.&amp;lt;redhat version&amp;gt;.&amp;lt;architecture&amp;gt;.rpm
Example:
MySQL-server-percona-5.0.87-b20.29.rhel5.x86_64.rpm


See release notes for earlier changes.
Since the build 20 MySQL server with Percona patches is available in Percona RPM repository via YUM. To make it working add a file Percona.repo in /etc/yum.repos.d with following content
PLAIN TEXT
CODE:




&amp;#91;percona&amp;#93;


name=CentOS-$releasever - Percona


baseurl=http://repo.percona.com/centos/$releasever/os/$basearch/


gpgcheck=0 






As usual you can download binaries and sources with the patches here
http://www.percona.com/mysql/5.0.87-b20/
There is Debian packages repository is also available. See release page for configuration and usage guideance.
The Percona patches live on Launchpad : https://launchpad.net/percona-patches and you can report bug to Launchpad bug system:
https://launchpad.net/percona-patches/+filebug. The documentation is available on our Wiki
For general questions use our Pecona-discussions group, and for development question Percona-dev group.
For support, commercial and sponsorship inquiries contact Percona.

innodb_rw_lock.patch

    
    Entry posted by Aleksandr Kuzminsky |
      2 comments
    Add to:  |  |  |  | </description>
    <content:encoded><![CDATA[<p>Dear Community,</p>
<p>We are pleased to present the 20th build of MySQL server with Percona patches.</p>
<p>Comparing to the previous release it has following new features:</p>
<ul>
<li>The build is based on MySQL-5.0.87</li>
<li><a href="http://www.percona.com/docs/wiki/patches%3Ainnodb_rw_lock">innodb_rw_lock.patch</a> is ported from InnoDB Plugin 1.0.3</li>
<li>To be compatible with RedHat RPM repository, the naming scheme has changed to
<pre>&lt;rpm name&gt;-&lt;mysql version&gt;-&lt;percona build version&gt;.&lt;buildnumber&gt;.&lt;redhat version&gt;.&lt;architecture&gt;.rpm</pre>
<p>Example:</p>
<pre>MySQL-server-percona-5.0.87-b20.29.rhel5.x86_64.rpm</pre>
</li>
</ul>
<p>See <a href="http://www.percona.com/docs/wiki/release%3Arelease-notes">release notes</a> for earlier changes.</p>
<p>Since the build 20 MySQL server with Percona patches is available in Percona RPM repository via YUM. To make it working add a file <em>Percona.repo</em> in <em>/etc/yum.repos.d</em> with following content</p>
<div><span><a href="http://www.mysqlperformanceblog.com">PLAIN TEXT</a></span></div>
<div><span>CODE:</span>
<div>
<div>
<ol>
<li>
<div><span>&#91;</span>percona<span>&#93;</span></div>
</li>
<li>
<div>name=CentOS-$releasever - Percona</div>
</li>
<li>
<div>baseurl=http:<span>//repo.percona.com/centos/$releasever/os/$basearch/</span></div>
</li>
<li>
<div>gpgcheck=<span>0</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>As usual you can download binaries and sources with the patches here<br />
<a href="http://www.percona.com/mysql/5.0.87-b20/">http://www.percona.com/mysql/5.0.87-b20/</a></p>
<p>There is Debian packages repository is also available. See <a href="http://www.percona.com/docs/wiki/release%3Astart#percona_apt_repository">release page</a> for configuration and usage guideance.</p>
<p>The Percona patches live on Launchpad : <a href="https://launchpad.net/percona-patches">https://launchpad.net/percona-patches</a> and you can report bug to Launchpad bug system:</p>
<p><a href="https://launchpad.net/percona-patches/+filebug">https://launchpad.net/percona-patches/+filebug</a>. The documentation is available on <a href="http://www.percona.com/docs/wiki/patches%3Astart">our Wiki</a></p>
<p>For general questions use our <a href="http://groups.google.com/group/percona-discussion">Pecona-discussions</a> group, and for development question <a href="http://groups.google.com/group/percona-dev">Percona-dev</a> group.</p>
<p>For support, commercial and sponsorship inquiries contact <a href="http://www.percona.com/contacts.html">Percona</a>.</p>
<div>
<pre>innodb_rw_lock.patch</pre>
</div>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Aleksandr Kuzminsky |
      <a href="http://www.mysqlperformanceblog.com/2009/11/18/5-0-87-build20-percona-binaries/#comments">2 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/11/18/5-0-87-build20-percona-binaries/&amp;title=5.0.87-build20%20Percona%20binaries" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/11/18/5-0-87-build20-percona-binaries/&amp;title=5.0.87-build20%20Percona%20binaries" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/11/18/5-0-87-build20-percona-binaries/&amp;title=5.0.87-build20%20Percona%20binaries" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/11/18/5-0-87-build20-percona-binaries/&amp;T=5.0.87-build20%20Percona%20binaries" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/11/18/5-0-87-build20-percona-binaries/&amp;title=5.0.87-build20%20Percona%20binaries" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22297&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22297&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 10:04:54 +0000</pubDate>
    <dc:creator>MySQL Performance Blog</dc:creator>
    <category>announce</category>
    <category>mysql</category>
  </item>

  <item>
    <title>MySQL University: Memcached Functions for MySQL</title>
    <guid isPermaLink="false">http://blogs.sun.com/mysqlf/entry/mysql_university_memcached_functions_for</guid>
    <link>http://blogs.sun.com/mysqlf/entry/mysql_university_memcached_functions_for</link>
    <description>This
Thursday (November 19th, 14:00 UTC), Patrick Galbraith will present memcached Functions for MySQL (UDFs). This session is about a suite of functions available to use with MySQL that allow you to store, retrieve and delete data, as well as most of the functions and operations that are available with libmemcached, such as server connectivity to the client, server status, client behaviors, and more. You can combine the fetching of data from one or more tables with the fetching of data from memcached and be able to apply any SQL operations on that result set such as LIMIT, sorting and other conditional operations. 
  For MySQL University sessions, point your browser to this page. You need a browser with a working Flash plugin. You may register for a Dimdim account, but you don't have to. (Dimdim is the conferencing system we're using for MySQL University sessions. It provides integrated voice streaming, chat, whiteboard, session recording, and more.) All MySQL University sessions are recorded, that is, slides and voice can be viewed as a Flash movie (.flv). You can find those recordings on the respective MySQL University session pages which are listed on the MySQL University home page.  
  MySQL University is a free educational online program for engineers/developers. MySQL University sessions are open to anyone, not just Sun employees. Sessions are recorded (slides and audio), so if you can't attend the live session you can look at the recording anytime after the session.  
  Here's the schedule for the rest of this year:  
   
    November 26: The Spider Storage Engine (Giuseppe Maxia) 
    December 3: Practical Full-Text Search in MySQL (Bill Karwin) 
   
  The schedule is not engraved in stone at this point. Please visit http://forge.mysql.com/wiki/MySQL_University#Upcoming_Sessions for the up-to-date list. On that page, you can also find the starting time for many time zones.</description>
    <content:encoded><![CDATA[<p><a href="http://forge.mysql.com/wiki/MySQL_University"><img border="0" align="right" src="http://blogs.sun.com/mysqlf/resource/Mysql-university-256.png" /></a>This
Thursday (November 19th, 14:00 UTC), Patrick Galbraith will present <a title="Memcached Functions for MySQL (UDFs)" href="http://forge.mysql.com/wiki/Memcached_Functions_for_MySQL_(UDFs)">memcached Functions for MySQL (UDFs)</a>. This session is about a suite of functions available to use with MySQL that allow you to store, retrieve and delete data, as well as most of the functions and operations that are available with libmemcached, such as server connectivity to the client, server status, client behaviors, and more. You can combine the fetching of data from one or more tables with the fetching of data from memcached and be able to apply any SQL operations on that result set such as LIMIT, sorting and other conditional operations.</p> 
  <p>For MySQL University sessions, point your browser <a href="http://webmeeting.dimdim.com/portal/JoinForm.action?confKey=mysqluniversity">to this page</a>. You need a browser with a working Flash plugin. You may register for a Dimdim account, but you don't have to. (Dimdim is the conferencing system we're using for MySQL University sessions. It provides integrated voice streaming, chat, whiteboard, session recording, and more.) All MySQL University sessions are recorded, that is, slides and voice can be viewed as a Flash movie (.flv). You can find those recordings on the respective MySQL University session pages which are listed <a href="http://forge.mysql.com/wiki/MySQL_University">on the MySQL University home page</a>.</p>  
  <p>MySQL University is a free educational online program for engineers/developers. MySQL University sessions are open to anyone, not just Sun employees. Sessions are recorded (slides and audio), so if you can't attend the live session you can look at the recording anytime after the session.</p>  
  <p>Here's the schedule for the rest of this year:</p>  
  <ul> 
    <li>November 26: The Spider Storage Engine (Giuseppe Maxia)</li> 
    <li>December 3: Practical Full-Text Search in MySQL (Bill Karwin)</li> 
  </ul> 
  <p>The schedule is not engraved in stone at this point. Please visit <a href="http://forge.mysql.com/wiki/MySQL_University#Upcoming_Sessions">http://forge.mysql.com/wiki/MySQL_University#Upcoming_Sessions</a> for the up-to-date list. On that page, you can also find the starting time for many time zones.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22298&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22298&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 10:04:20 +0000</pubDate>
    <dc:creator>Stefan Hinz</dc:creator>
    <category>Sun</category>
    <category>memcached</category>
    <category>mysql</category>
    <category>udf</category>
    <category>university</category>
  </item>

  <item>
    <title>InnoDB Tablespace Corruption</title>
    <guid isPermaLink="false">http://venublog.com/2009/11/17/innodb-tablespace-corruption/</guid>
    <link>http://venublog.com/2009/11/17/innodb-tablespace-corruption/</link>
    <description>Over the weekend, I experienced a strange issue (even though its not new) with the InnoDB tablespace (ibdata) corruption. When in general InnoDB crashes, it automatically recovers during the next start by rolling back/forward based on what was pending and un-flushed/un-committed changes at the time of crash.
But for some reason, one of the server; we ran out of disk space (yeah, no alerts) on data directory; where we store everything (tablespace, logs and data); and server was running for few hours in this mode (disk full); and it became un-available and not responding after a while. Only option left was to kill the server process and its PID along with cleaning the stuff to get the space back.  After I (re)started the server; server failed to start with the following error..

InnoDB: Error: trying to access page number 1098759810 in space 0,
InnoDB: space name /data/ibdata1,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.

Means the tablespace is corrupted.. By enabling the monitor; I noticed the following..

InnoDB: Error: data dictionary entry for table DBXX/tableXX is corrupt!
InnoDB: Index field 0 is delete marked.
091117 20:32:47InnoDB: Assertion failure in thread 1148791104 in file dict0load.c line 503
InnoDB: Failing assertion: ut_memcmp&amp;#40;buf, field, len&amp;#41; == 0

Looks like a modification to primary key on that table which was never persisted&amp;#8230;as it failed to write anything to disk just before the crash; wondering why the engine did not trap it earlier as it will not mark as persistent unless a write to log returns success (even if the modified entries are in memory, the change is written in log as everything else is rolled back)
Anyway, I recovered using innodb_force_recovery=4 and dumped and re-loaded it as it failed sub-sequent restarts to start again even after the first recovery (well, should not start as dictionary is wrong)&amp;#8230;
Time for me to simulate this scenario on Drizzle and Maria for fun (Just got the source of Maria couple of days back, and should start contributing the code) to see how it works out in the coming days.</description>
    <content:encoded><![CDATA[<p>Over the weekend, I experienced a strange issue (even though its not new) with the InnoDB tablespace (ibdata) corruption. When in general InnoDB crashes, it automatically recovers during the next start by rolling back/forward based on what was pending and un-flushed/un-committed changes at the time of crash.</p>
<p>But for some reason, one of the server; we ran out of disk space (yeah, no alerts) on data directory; where we store everything (tablespace, logs and data); and server was running for few hours in this mode (disk full); and it became un-available and not responding after a while. Only option left was to kill the server process and its PID along with cleaning the stuff to get the space back.  After I (re)started the server; server failed to start with the following error..</p>

<div><table width="100%" ><tr><td><pre><span>InnoDB</span>: Error: trying <span>to</span> access page number 1098759810 <span>in</span> <span>space</span> 0<span>,</span>
<span>InnoDB</span>: <span>space</span> name <span>/</span><span>data</span><span>/</span>ibdata1<span>,</span>
<span>InnoDB</span>: which <span>is</span> outside the <span>tablespace</span> bounds.
<span>InnoDB</span>: Byte <span>offset</span> 0<span>,</span> len 16384<span>,</span> i<span>/</span>o <span>type</span> <span>10</span>.</pre></td></tr></table></div>

<p>Means the tablespace is corrupted.. By enabling the monitor; I noticed the following..</p>

<div><table width="100%" ><tr><td><pre><span>InnoDB</span>: Error: <span>data</span> dictionary entry for <span>table</span> DBXX<span>/</span>tableXX <span>is</span> corrupt<span>!</span>
<span>InnoDB</span>: <span>Index</span> <span>field</span> 0 <span>is</span> <span>delete</span> marked.
091117 20:32:47InnoDB: Assertion failure <span>in</span> thread 1148791104 <span>in</span> file dict0load.c line 503
<span>InnoDB</span>: Failing assertion: ut_memcmp<span>&#40;</span>buf<span>,</span> <span>field</span><span>,</span> len<span>&#41;</span> <span>==</span> <span>0</span></pre></td></tr></table></div>

<p>Looks like a modification to primary key on that table which was never persisted&#8230;as it failed to write anything to disk just before the crash; wondering why the engine did not trap it earlier as it will not mark as persistent unless a write to log returns success (even if the modified entries are in memory, the change is written in log as everything else is rolled back)</p>
<p>Anyway, I recovered using <a href="http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html">innodb_force_recovery=4</a> and dumped and re-loaded it as it failed sub-sequent restarts to start again even after the first recovery (well, should not start as dictionary is wrong)&#8230;</p>
<p>Time for me to simulate this scenario on Drizzle and Maria for fun (Just got the source of Maria couple of days back, and should start contributing the code) to see how it works out in the coming days.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22295&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22295&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 05:10:23 +0000</pubDate>
    <dc:creator>Venu Anuganti</dc:creator>
    <category>Database</category>
    <category>MySQL</category>
    <category>InnoDB crash</category>
    <category>InnoDB crash recovery</category>
    <category>Recover InnoDB TableSpace Corruption</category>
  </item>

  <item>
    <title>Digg Moved from MySQL to Cassandra?</title>
    <guid isPermaLink="false">http://mike.kruckenberg.com/archives/2009/11/digg-moved-from-mysql-to-cassandra.html</guid>
    <link>http://mike.kruckenberg.com/archives/2009/11/digg-moved-from-mysql-to-cassandra.html</link>
    <description>At today's Web 2.0 Expo keynote with Kevin Rose and Jay Adelson they mentioned they'd done a lot of architecture work on Digg including moving things from MySQL to Cassandra.

I guess something like this was on the table in 2006, mentioned in this O'Reilly article, but the comments clear it up as more of a &quot;we've thought about it and are sticking with MySQL.&quot;

This whole idea of NoSQL, and that developers would rank performance over normalization and ability to use joins is interesting. At today's NoSQL talk there was a good Q/A where folks got to ask questions like &quot;what if you need transactions&quot; or &quot;how consistent is data replicated to other servers.&quot; NoSQL adopts the line about choosing &quot;the right tool for the job&quot;, so the response to many of these questions is not what a died-in-the-wool RDBMS user would be looking to hear.

Interesting to see how this class of data storage evolves. The prediction at today's talk was that in 12 months most new web development would be happening on a NoSQL database. Hmm. The web moves fast, but I'm not sure about that one.</description>
    <content:encoded><![CDATA[<p>At today's <a href="http://www.web2expo.com/webexny2009/public/schedule/detail/10516">Web 2.0 Expo keynote with Kevin Rose and Jay Adelson</a> they mentioned they'd done a lot of architecture work on Digg including moving things from MySQL to <a href="http://incubator.apache.org/cassandra/">Cassandra</a>.</p>

<p>I guess something like this was on the table in 2006, mentioned in <a href="http://www.oreillynet.com/onlamp/blog/2006/04/digg_phps_scalability_and_perf.html">this O'Reilly article</a>, but the comments clear it up as more of a "we've thought about it and are sticking with MySQL."</p>

<p>This whole idea of NoSQL, and that developers would rank performance over normalization and ability to use joins is interesting. At <a href="http://mike.kruckenberg.com/archives/2009/11/nosql-the-shift-to-a-nonrelational-world.html">today's NoSQL talk</a> there was a good Q/A where folks got to ask questions like "what if you need transactions" or "how consistent is data replicated to other servers." NoSQL adopts the line about choosing "the right tool for the job", so the response to many of these questions is not what a died-in-the-wool RDBMS user would be looking to hear.</p>

<p>Interesting to see how this class of data storage evolves. The prediction at today's talk was that in 12 months most new web development would be happening on a NoSQL database. Hmm. The web moves fast, but I'm not sure about that one.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22293&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22293&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 18 Nov 2009 01:18:26 +0000</pubDate>
    <dc:creator>Mike Kruckenberg</dc:creator>
    <category>Technology</category>
  </item>

  <item>
    <title>Dirty growth-over-time query</title>
    <guid isPermaLink="false">http://themattreid.com/wordpress/?p=251</guid>
    <link>http://feedproxy.google.com/~r/Themattreid/~3/FUCjETtnhHg/</link>
    <description>I&amp;#8217;ve been messing around with the Kontrollbase schema for the last couple of days, writing various queries for the daily reporting scripts that will eventually be an automated pdf report. I&amp;#8217;ll give you examples of two of the queries, the first being overall environment stats, and the second being single-host growth over time.
Overall environment stats
select ((((MAX(os_mem_used)) / 1024 ) / 1024) / 1024) max_os_mem_used, ((((MIN(os_mem_used)) / 1024 ) / 1024) / 1024) min_os_mem_used, ((((AVG(os_mem_used)) / 1024 ) / 1024) / 1024) avg_os_mem_used, ((((STDDEV_POP(os_mem_used)) / 1024 ) / 1024) / 1024) stdev_os_mem_used, ((((MAX(length_data + length_index)) / 1024 ) / 1024) / 1024) max_size, ((((MIN(length_data + length_index)) / 1024 ) / 1024) / 1024) min_size, ((((AVG(length_data + length_index)) / 1024 ) / 1024) / 1024) avg_size, ((((STDDEV_POP(length_data + length_index)) / 1024 ) / 1024) / 1024) stdev_size, MAX(num_connections) max_connections,  MIN(num_connections) min_connections, AVG(num_connections) avg_connections, STDDEV_POP(num_connections) stdev_connections, MAX(queries_per_second) max_qps, MIN(queries_per_second) min_qps, AVG(queries_per_second) avg_qps, STDDEV_POP(queries_per_second) stdev_qps from server_statistics;
*************************** 1. row ***************************
max_os_mem_used: 50.743488311768
min_os_mem_used: 0.023044586182
avg_os_mem_used: 1.5759627057922952
stdev_os_mem_used: 2.4064208226596184
max_size: 283.815660957247
min_size: 0.000492287800
avg_size: 10.8213909777686940
stdev_size: 39.9443980717105447
max_connections: 435
min_connections: 0
avg_connections: 16.9734
stdev_connections: 37.3269
stdev_os_mem_used: 2.4064208226596184
max_qps: 9243.6533203125
min_qps: 0.00011409764556447
avg_qps: 216.421064774444
stdev_qps: 1071.72792986232
1 row in set (0.00 sec)
single-host growth over time
mysql&gt; select (select (((length_data + length_index) / 1024) / 1024) as curr_size from server_statistics where server_list_id='44' and CURDATE() </description>
    <content:encoded><![CDATA[<p>I&#8217;ve been messing around with the Kontrollbase schema for the last couple of days, writing various queries for the daily reporting scripts that will eventually be an automated pdf report. I&#8217;ll give you examples of two of the queries, the first being overall environment stats, and the second being single-host growth over time.</p>
<p><strong>Overall environment stats</strong><br />
<code>select ((((MAX(os_mem_used)) / 1024 ) / 1024) / 1024) max_os_mem_used, ((((MIN(os_mem_used)) / 1024 ) / 1024) / 1024) min_os_mem_used, ((((AVG(os_mem_used)) / 1024 ) / 1024) / 1024) avg_os_mem_used, ((((STDDEV_POP(os_mem_used)) / 1024 ) / 1024) / 1024) stdev_os_mem_used, ((((MAX(length_data + length_index)) / 1024 ) / 1024) / 1024) max_size, ((((MIN(length_data + length_index)) / 1024 ) / 1024) / 1024) min_size, ((((AVG(length_data + length_index)) / 1024 ) / 1024) / 1024) avg_size, ((((STDDEV_POP(length_data + length_index)) / 1024 ) / 1024) / 1024) stdev_size, MAX(num_connections) max_connections,  MIN(num_connections) min_connections, AVG(num_connections) avg_connections, STDDEV_POP(num_connections) stdev_connections, MAX(queries_per_second) max_qps, MIN(queries_per_second) min_qps, AVG(queries_per_second) avg_qps, STDDEV_POP(queries_per_second) stdev_qps from server_statistics;<br />
*************************** 1. row ***************************<br />
max_os_mem_used: 50.743488311768<br />
min_os_mem_used: 0.023044586182<br />
avg_os_mem_used: 1.5759627057922952<br />
stdev_os_mem_used: 2.4064208226596184<br />
max_size: 283.815660957247<br />
min_size: 0.000492287800<br />
avg_size: 10.8213909777686940<br />
stdev_size: 39.9443980717105447<br />
max_connections: 435<br />
min_connections: 0<br />
avg_connections: 16.9734<br />
stdev_connections: 37.3269<br />
stdev_os_mem_used: 2.4064208226596184<br />
max_qps: 9243.6533203125<br />
min_qps: 0.00011409764556447<br />
avg_qps: 216.421064774444<br />
stdev_qps: 1071.72792986232<br />
1 row in set (0.00 sec)</code></p>
<p><strong>single-host growth over time</strong><br />
<code>mysql> select (select (((length_data + length_index) / 1024) / 1024) as curr_size from server_statistics where server_list_id='44' and CURDATE() <= Creation_time order by Creation_time asc limit 1) as 0_day_size_mb, (select (((length_data + length_index) / 1024) / 1024) as curr_size from server_statistics where server_list_id='44' and DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= Creation_time order by Creation_time asc limit 1) as 30_day_size_mb, ( (select (((length_data + length_index) / 1024) / 1024) as curr_size from server_statistics where server_list_id='44' and CURDATE() <= Creation_time order by Creation_time asc limit 1) - (select (((length_data + length_index) / 1024) / 1024) as curr_size from server_statistics where server_list_id='44' and DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= Creation_time order by Creation_time asc limit 1)) as difference, ( select (select ((select (((length_data + length_index) / 1024) / 1024) as curr_size from server_statistics where server_list_id='44' and CURDATE() <= Creation_time order by Creation_time asc limit 1) - (select (((length_data + length_index) / 1024) / 1024) as curr_size from server_statistics where server_list_id='44' and DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= Creation_time order by Creation_time asc limit 1)) as difference) / (select(select (((length_data + length_index) / 1024) / 1024) as curr_size from server_statistics where server_list_id='44' and CURDATE() <= Creation_time order by Creation_time asc limit 1) as 0_day_size_mb ) * 100) as percent_growth;<br />
+---------------+----------------+--------------+----------------+<br />
| 0_day_size_mb | 30_day_size_mb | difference   | percent_growth |<br />
+---------------+----------------+--------------+----------------+<br />
| 9100.43986130 |  8199.39263916 | 901.04722214 | 9.901139240197 |<br />
+---------------+----------------+--------------+----------------+<br />
1 row in set (0.01 sec)</code></p>
<img src="http://feeds.feedburner.com/~r/Themattreid/~4/FUCjETtnhHg" height="1" width="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22292&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22292&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 17 Nov 2009 20:19:14 +0000</pubDate>
    <dc:creator>Matt Reid</dc:creator>
    <category>Kontrollbase</category>
    <category>Schema design</category>
  </item>

  <item>
    <title>New TokuDB 2.2.0 feature: more query progress information</title>
    <guid isPermaLink="false">http://tokutek.com/?p=806</guid>
    <link>http://tokutek.com/2009/11/new-tokudb-2-2-0-feature-more-query-progress-information/</link>
    <description>
Last spring, we added a feature that allows the user to see the progress of writes in a statement. Vadim liked it. In 2.2.0, in &amp;#8220;show processlist&amp;#8221;, we add progress information on reads.

Here is an example of what &amp;#8220;show processlist&amp;#8221; displays on an update:

mysql&amp;gt; show processlist \G
*************************** 1. row ***************************
Id: 1
User: root
Host: localhost
db: test
Command: Query
Time: 7
State: Queried about 1576008 rows, Updated about 197000 rows
Info: update foo set a=9 where a=8


Here is an example of what &amp;#8220;show processlist&amp;#8221; displays on an insert that requires a query:

mysql&amp;gt; show processlist \G
*************************** 1. row ***************************
Id: 1
User: root
Host: localhost
db: test
Command: Query
Time: 6
State: Queried about 1542001 rows, Inserted about 771000 rows
Info: insert into bar select* from foo where a &amp;lt; 5


And here is an example of what show processlist displays in a query:

mysql&amp;gt; show processlist \G
*************************** 1. row ***************************
Id: 1
User: root
Host: localhost
db: test
Command: Query
Time: 4
State: Queried about 2790000 rows
Info: select sum(a) from foo


As we see in the examples above, the work required to execute some statements are a combination of reads and writes. Having progress information on both helps provide the user with a better understanding of what is going on in the system.</description>
    <content:encoded><![CDATA[<p>
Last spring, we added a feature that allows the user to see the progress of writes in a statement. Vadim <a href="http://www.mysqlperformanceblog.com/2009/06/11/the-feature-i-love-in-tokudb/">liked</a> it. In 2.2.0, in &#8220;show processlist&#8221;, we add progress information on reads.</p>
<p>
Here is an example of what &#8220;show processlist&#8221; displays on an update:</p>
<pre>
mysql&gt; show processlist \G
*************************** 1. row ***************************
Id: 1
User: root
Host: localhost
db: test
Command: Query
Time: 7
State: Queried about 1576008 rows, Updated about 197000 rows
Info: update foo set a=9 where a=8
</pre>
<p>
Here is an example of what &#8220;show processlist&#8221; displays on an insert that requires a query:</p>
<pre>
mysql&gt; show processlist \G
*************************** 1. row ***************************
Id: 1
User: root
Host: localhost
db: test
Command: Query
Time: 6
State: Queried about 1542001 rows, Inserted about 771000 rows
Info: insert into bar select* from foo where a &lt; 5
</pre>
<p>
And here is an example of what show processlist displays in a query:</p>
<pre>
mysql&gt; show processlist \G
*************************** 1. row ***************************
Id: 1
User: root
Host: localhost
db: test
Command: Query
Time: 4
State: Queried about 2790000 rows
Info: select sum(a) from foo
</pre>
<p>
As we see in the examples above, the work required to execute some statements are a combination of reads and writes. Having progress information on both helps provide the user with a better understanding of what is going on in the system.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22291&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22291&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 17 Nov 2009 20:05:16 +0000</pubDate>
    <dc:creator>Tokuview Blog</dc:creator>
    <category>TokuView</category>
    <category>features</category>
    <category>mysql</category>
    <category>query+progress</category>
    <category>TokuDB</category>
  </item>

  <item>
    <title>451 CAOS Links 2009.11.17</title>
    <guid isPermaLink="false">http://blogs.the451group.com/opensource/?p=1281</guid>
    <link>http://feedproxy.google.com/~r/451opensource/~3/RQYnYJcXKg8/</link>
    <description>Larry Augustin confirmed as SugarCRM CEO. Red Hat&amp;#8217;s Fedora Project is 12. And more.
Follow 451 CAOS Links live @caostheory on Twitter and Identi.ca
&amp;#8220;Tracking the open source news wires, so you don&amp;#8217;t have to.&amp;#8221;
For the latest on Oracle&amp;#8217;s acquisition of MySQL via Sun, see Everything you always wanted to know about MySQL but were afraid to ask
# Larry Augustin was confirmed as full-time CEO of SugarCRM. 
# Red Hat, by way of the Fedora Project, announced the launch of Fedora 12.
# Microsoft is to release the .NET Micro Framework under the Apache 2.0 license.
# Simon Phipps introduced the concept of his Software Freedom Scorecard. Plans to propose as joint OSI and FSF initiative.
# Microsoft admitted inadvertent GPLv2 violation in Windows download tool, plans to publish code. 
# Lucid Imagination updated its LucidWorks Certified Distribution for Lucene 2.9. 
# Nexenta Systems announced NexentaStor 2.2, based on the ZFS file system. 
# Univa released version 5.0 of its UniCluster infrastructure and workload management software stack.
# A Canadian law firm suggested purchasers of tech companies are avoiding GPLv3 code to protect their patents. 
# Fluendo updated its Codec Pack of multimedia Linux/Unix codecs. 
# SGI launched the Altix UV Linux-based supercomputer.
# JetBrains announced the general availability of RubyMine 2.0, based on the open source IntelliJ Platform. 
# BonitaSoft’s BPM software is being integrated into eXo Platform DMS’s document management module. 
# Distributor Tech Data created Open Tech, a new program to attract open source ISVs and resellers. 
# WSO2 launched Cloud Platform including Cloud Virtual Machines; Cloud Connectors; and Governance-as-a-Service. 
# The QualiPSo Project released QualiPSo Factory, a SOA-based forge. 
# Sourcesense partnered with Sonatype to provide training, support, and customization services for Maven, Nexus.
</description>
    <content:encoded><![CDATA[<p>Larry Augustin confirmed as SugarCRM CEO. Red Hat&#8217;s Fedora Project is 12. And more.</p>
<p>Follow 451 CAOS Links live @caostheory on <a href="http://twitter.com/caostheory">Twitter</a> and <a href="http://identi.ca/caostheory">Identi.ca</a><br />
<em>&#8220;Tracking the open source news wires, so you don&#8217;t have to.&#8221;</em></p>
<p>For the latest on Oracle&#8217;s acquisition of MySQL via Sun, see <a href="http://blogs.the451group.com/opensource/2009/11/12/everything-you-always-wanted-to-know-about-mysql-but-were-afraid-to-ask-part-two/">Everything you always wanted to know about MySQL but were afraid to ask</a></p>
<p># Larry Augustin was <a href="http://bit.ly/1VxQyr">confirmed</a> as full-time CEO of SugarCRM. </p>
<p># Red Hat, by way of the Fedora Project, <a href="http://bit.ly/4zAspd">announced</a> the launch of Fedora 12.</p>
<p># Microsoft is to <a href="http://bit.ly/4gVJ31">release</a> the .NET Micro Framework under the Apache 2.0 license.</p>
<p># Simon Phipps <a href="http://bit.ly/1P1tBJ">introduced</a> the concept of his Software Freedom Scorecard. Plans to propose as joint OSI and FSF initiative.</p>
<p># Microsoft <a href="http://bit.ly/36NtRX%20">admitted</a> inadvertent GPLv2 violation in Windows download tool, plans to publish code. </p>
<p># Lucid Imagination <a href="http://bit.ly/4GA7Zo">updated</a> its LucidWorks Certified Distribution for Lucene 2.9. </p>
<p># Nexenta Systems <a href="http://bit.ly/3KvM2B">announced</a> NexentaStor 2.2, based on the ZFS file system. </p>
<p># Univa <a href="http://bit.ly/4o4YHx">released</a> version 5.0 of its UniCluster infrastructure and workload management software stack.</p>
<p># A Canadian law firm <a href="http://bit.ly/21jdjQ">suggested</a> purchasers of tech companies are avoiding GPLv3 code to protect their patents. </p>
<p># Fluendo <a href="http://bit.ly/2vfqx7">updated</a> its Codec Pack of multimedia Linux/Unix codecs. </p>
<p># SGI <a href="http://bit.ly/nJSh2">launched</a> the Altix UV Linux-based supercomputer.</p>
<p># JetBrains <a href="http://bit.ly/jKf17">announced</a> the general availability of RubyMine 2.0, based on the open source IntelliJ Platform. </p>
<p># BonitaSoft’s BPM software is being <a href="http://bit.ly/3jQ2j6">integrated</a> into eXo Platform DMS’s document management module. </p>
<p># Distributor Tech Data <a href="http://bit.ly/2BDBQi">created</a> Open Tech, a new program to attract open source ISVs and resellers. </p>
<p># WSO2 <a href="http://bit.ly/2Hg3h1">launched</a> Cloud Platform including Cloud Virtual Machines; Cloud Connectors; and Governance-as-a-Service. </p>
<p># The QualiPSo Project <a href="http://bit.ly/ghLgA">released</a> QualiPSo Factory, a SOA-based forge. </p>
<p># Sourcesense <a href="http://bit.ly/10d4VD">partnered</a> with Sonatype to provide training, support, and customization services for Maven, Nexus.</p>
<img src="http://feeds.feedburner.com/~r/451opensource/~4/RQYnYJcXKg8" height="1" width="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22289&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22289&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 17 Nov 2009 16:50:01 +0000</pubDate>
    <dc:creator>The 451 Group</dc:creator>
    <category>Links</category>
    <category>Software</category>
    <category>.NET Micro Grameowrk</category>
    <category>451 group</category>
    <category>451caostheory</category>
    <category>451group</category>
    <category>altix</category>
    <category>apache</category>
    <category>Bonitasoft</category>
    <category>caostheory</category>
    <category>eXo platform</category>
    <category>fedora</category>
    <category>fluendo</category>
    <category>gplv2</category>
    <category>GPLv3</category>
    <category>JetBrains</category>
    <category>Larry Augustin</category>
    <category>Linux</category>
    <category>Lucene</category>
    <category>lucid imagination</category>
    <category>lucidworks</category>
    <category>matt aslett</category>
    <category>mattaslett</category>
    <category>matthew aslett</category>
    <category>matthe</category>
  </item>

  <item>
    <title>What we all hate in todays CMS software</title>
    <guid isPermaLink="false">http://pooteeweet.org/blog/0/1589</guid>
    <link>http://pooteeweet.org/blog/0/1589</link>
    <description>This is just a quick start for a brainstorming of what we all hate in todays CMS (I am including portal/community software here as well and I guess most also applies to web shops) software out there. I have written a very small CMS application myself ages ago so I do not have experience in what its really like writing and maintaining a big one. All I know is that its insanely painful to deal with any of them, though if your site is all about having admins managing tons of static content or end users wanting to interact, there is little way around these ugly beasts. I guess it all boils down to how to persist changes made through and admin panel. Somewhat related is the issue of scalability which to me mainly boils down to how easily can the storage logic be changed without changing the business logic on top.

The biggest gripe that results from these ever so powerful admin panels is the tendency to have these settings stored in the database. In combination with non universal auto generated primary keys it means that not only will it be hard to keep development and production in sync. Some things done inside the admin panel is classic content but a fair bit is configuration which we traditionally want to store inside our software code management repository. Not sure how, but my dream CMS would know the difference and commit configuration to my SCM and it would not depend on meaningless integer ID's that only have meaning inside a single database.

The other big thing I dread is the fact that while most people these days have bought into the MVC concept, few people actually choose a technology that really enables their model layer to offer a true separation of how their data is persisted. I think we all agree that one of the key selling points of all the currently popular CMS is the large number of out of the box features and available plugins. However for the most part they end up using the EAV pattern if they use an RDBMS. In the PHP space I am not sure if we even have a feature rich CMS based on document stores yet, then again I also do not see these as the holy grail either. Document stores are nice in a lot of ways, mainly because they offer a clean solution to having to deal with hierarchical data and more importantly flexibility in managing different content types. But at the same time they loose a lot of the power of an RDBMS that allows for powerful reporting, data manipulation via SQL. Of course the same can be achieved by custom coding but not with the same speed both in development and execution.

Anyways I digress, all I want to say is that my dream CMS gives me as much flexibility in managing data persistence. So no stupid EAV pattern (*), no hardcoded relational tree algorithms or ways to leverage RDBMS specific features from the chosen RDBMS .. be it Oracle, MySQL, PostgreSQL or whatever. But also no insisting that a document store is the holy grail for sorting any kind of data. As such I see much appeal in content stores (we are developing PHP implementation for a content store here at Liip for this very reason) or at the very least using a real ORM like Doctrine (and no none of your active records on steroids qualify).

I guess the last one is very obvious and at different levels this has been done well in existing CMS solutions or not: Define a solid API for adding additional functionality. I think the biggest challenge here is figuring how to balance the want for a low barrier to entry for non developers versus enabling developers to properly design their software. Simple usually means few hooks that are insanely (and increasingly) wide. At the other end you get a situation where everything is done inside layers and layers of inheritance which means you need to open/customize a bazillion number of files to do anything (that cannot be done through the admin panel).

This point is easiest to fail at, since its very grey-ish. At least to me its obviously bogus to mix content with configuration or to use EAV to store custom content types. But its not so easy to balance out ease of use versus flexibility. Either things are too hard for non developers or they are too simple for real developers. Either the app does not gain a large enough user base or it gets too many non developers destroying any sense of consistency (resulting in mass suicide of the only people who are able to fix things). I guess nobody can get it right the first time, then again looking at the current CMS it seems that nobody managed to get to the right balance through evolution either.

(*) Yes my answer to all people using the EAV pattern is to allow the admin panel to generate and execute DDL.</description>
    <content:encoded><![CDATA[<p>This is just a quick start for a brainstorming of what we all hate in todays CMS (I am including portal/community software here as well and I guess most also applies to web shops) software out there. I have written a very small CMS application myself ages ago so I do not have experience in what its really like writing and maintaining a big one. All I know is that its insanely painful to deal with any of them, though if your site is all about having admins managing tons of static content or end users wanting to interact, there is little way around these ugly beasts. I guess it all boils down to how to persist changes made through and admin panel. Somewhat related is the issue of scalability which to me mainly boils down to how easily can the storage logic be changed without changing the business logic on top.</p>

<p>The biggest gripe that results from these ever so powerful admin panels is the tendency to have these settings stored in the database. In combination with non universal auto generated primary keys it means that not only will it be hard to keep development and production in sync. Some things done inside the admin panel is classic content but a fair bit is configuration which we traditionally want to store inside our software code management repository. Not sure how, but my dream CMS would know the difference and commit configuration to my SCM and it would not depend on meaningless integer ID's that only have meaning inside a single database.</p>

<p>The other big thing I dread is the fact that while most people these days have bought into the MVC concept, few people actually choose a technology that really enables their model layer to offer a true separation of how their data is persisted. I think we all agree that one of the key selling points of all the currently popular CMS is the large number of out of the box features and available plugins. However for the most part they end up using the <a href="http://en.wikipedia.org/wiki/Entity-attribute-value_model">EAV pattern</a> if they use an RDBMS. In the PHP space I am not sure if we even have a feature rich CMS based on document stores yet, then again I also do not see these as the holy grail either. Document stores are nice in a lot of ways, mainly because they offer a clean solution to having to deal with hierarchical data and more importantly flexibility in managing different content types. But at the same time they loose a lot of the power of an RDBMS that allows for powerful reporting, data manipulation via SQL. Of course the same can be achieved by custom coding but not with the same speed both in development and execution.</p>

<p>Anyways I digress, all I want to say is that my dream CMS gives me as much flexibility in managing data persistence. So no stupid EAV pattern (*), no hardcoded relational tree algorithms or ways to leverage RDBMS specific features from the chosen RDBMS .. be it Oracle, MySQL, PostgreSQL or whatever. But also no insisting that a document store is the holy grail for sorting any kind of data. As such I see much appeal in content stores (we are developing <a href="https://fosswiki.liip.ch/display/jackalope/Home">PHP implementation for a content store</a> here at Liip for this very reason) or at the very least using a real ORM like <a href="http://www.doctrine-project.org/">Doctrine</a> (and no none of your active records on steroids qualify).</p>

<p>I guess the last one is very obvious and at different levels this has been done well in existing CMS solutions or not: Define a solid API for adding additional functionality. I think the biggest challenge here is figuring how to balance the want for a low barrier to entry for non developers versus enabling developers to properly design their software. Simple usually means few hooks that are insanely (and increasingly) wide. At the other end you get a situation where everything is done inside layers and layers of inheritance which means you need to open/customize a bazillion number of files to do anything (that cannot be done through the admin panel).</p>

<p>This point is easiest to fail at, since its very grey-ish. At least to me its obviously bogus to mix content with configuration or to use EAV to store custom content types. But its not so easy to balance out ease of use versus flexibility. Either things are too hard for non developers or they are too simple for real developers. Either the app does not gain a large enough user base or it gets too many non developers destroying any sense of consistency (resulting in mass suicide of the only people who are able to fix things). I guess nobody can get it right the first time, then again looking at the current CMS it seems that nobody managed to get to the right balance through evolution either.</p>

<p>(*) Yes my answer to all people using the EAV pattern is to allow the admin panel to generate and execute DDL.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22288&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22288&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 17 Nov 2009 15:47:00 +0000</pubDate>
    <dc:creator>Lukas Smith</dc:creator>
    <category>general</category>
  </item>

  <item>
    <title>Webinar on Building Fast Query/Analytic Databases</title>
    <guid isPermaLink="false">http://infinidb.org/infinidb-blog/join-tomorrows-webinar-on-building-fast-queryanalytic-databases.html</guid>
    <link>http://infinidb.org/infinidb-blog/join-tomorrows-webinar-on-building-fast-queryanalytic-databases.html</link>
    <description>I'll be doing a Webinar tomorrow (Nov 18) with some of the MySQL folks on how to build fast read-intensive and analytic databases, so join us if you can.&amp;nbsp; We'll go over some key decision points that can make big differences in the performance of query-based applications and also talk a little about InfiniDB and our approach.Register at: http://www.mysql.com/news-and-events/web-seminars/display-459.html . Hope to see you there...</description>
    <content:encoded><![CDATA[<p>I'll be doing a Webinar tomorrow (Nov 18) with some of the MySQL folks on how to build fast read-intensive and analytic databases, so join us if you can.&nbsp; We'll go over some key decision points that can make big differences in the performance of query-based applications and also talk a little about InfiniDB and our approach.</p><br/><p>Register at: http://www.mysql.com/news-and-events/web-seminars/display-459.html . Hope to see you there...</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22290&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22290&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 17 Nov 2009 15:45:52 +0000</pubDate>
    <dc:creator>Robin Schumacher</dc:creator>
  </item>

  <item>
    <title>Recap of Portland OpenSQL Camp 2009</title>
    <guid isPermaLink="false">http://www.xaprb.com/blog/?p=1298</guid>
    <link>http://www.xaprb.com/blog/2009/11/17/recap-of-portland-opensql-camp-2009/</link>
    <description>I was at OpenSQL Camp 2009 in Portland last weekend.  I thought the event was very well done.  On Friday we had a pizza party at Old Town Pizza, which was awesome.  Saturday and Sunday were breakfast, sessions, lunch (yum), and sessions and hacking.  These were held at souk, a co-working space.  After 5PM, people got together for dinner, beer, etc.

I presented on mk-query-digest &amp;#8212; a live demo of features requested by the audience.  Sessions from others that I thought were particularly good included ones on CouchDB and MongoDB.  I mixed up the time and missed the session from Tokutek on how fractal tree indexes work.  I&amp;#8217;ll try to watch the video if that one was taped.

During the hackathons, Daniel and I worked on Maatkit.  We are laying groundwork for a more powerful mk-query-digest.

As you may know, I created OpenSQL Camp.  But I was not involved in organizing this or the previous event in Germany, which I think is great.  I talked briefly with Eric and Selena about seeing if we could put together a recipe to make the process easy for folks to organize their own.  We should be able to lay out checklists and timelines of major things &amp;#8212; location, shirts, sponsorship, budgeting, food.  Eric and Selena got great food, much better than the Panera catering I had for the first event.  Those kinds of decisions and results should be recorded.  It would be great to be able to treat it like a franchise so anyone could just add water and make their own.

I also might be willing to help organize another on the East Coast, perhaps as soon as next year if I can reduce my workload enough to have the time.  I&amp;#8217;d probably want to do something in or near Washington DC, which is a more convenient location with better public transport than my hometown of Charlottesville.

It all started out as a response to complaints about MySQL&amp;#8217;s annual conference not being a user&amp;#8217;s conference, but nobody actually doing anything about it.  I decided to do something about it, in a more inclusive way.  And judging by the attendees and talks at the two I&amp;#8217;ve gone to, people were happy to say yes to that.  I think if there are continued events, that&amp;#8217;s the ultimate measure of success.

Related posts:OpenSQL Camp events in 2009 There are Going to OpenSQL Camp US 2009 I&amp;#8217;veOpenSQL Camp 2009 plans announced I&amp;#8217;m 
Related posts brought to you by Yet Another Related Posts Plugin.</description>
    <content:encoded><![CDATA[<p>I was at <a href="http://opensqlcamp.org/Events/Portland2009/">OpenSQL Camp 2009 in Portland</a> last weekend.  I thought the event was very well done.  On Friday we had a pizza party at Old Town Pizza, which was awesome.  Saturday and Sunday were breakfast, sessions, lunch (yum), and sessions and hacking.  These were held at <a href="http://www.soukllc.com/">souk</a>, a co-working space.  After 5PM, people got together for dinner, beer, etc.</p>

<p>I presented on mk-query-digest &#8212; a live demo of features requested by the audience.  Sessions from others that I thought were particularly good included ones on CouchDB and MongoDB.  I mixed up the time and missed the session from Tokutek on how fractal tree indexes work.  I&#8217;ll try to watch the video if that one was taped.</p>

<p>During the hackathons, Daniel and I worked on Maatkit.  We are laying groundwork for a more powerful mk-query-digest.</p>

<p>As you may know, I created OpenSQL Camp.  But I was not involved in organizing this or the previous event in Germany, which I think is great.  I talked briefly with Eric and Selena about seeing if we could put together a recipe to make the process easy for folks to organize their own.  We should be able to lay out checklists and timelines of major things &#8212; location, shirts, sponsorship, budgeting, food.  Eric and Selena got great food, much better than the Panera catering I had for the first event.  Those kinds of decisions and results should be recorded.  It would be great to be able to treat it like a franchise so anyone could just add water and make their own.</p>

<p>I also might be willing to help organize another on the East Coast, perhaps as soon as next year if I can reduce my workload enough to have the time.  I&#8217;d probably want to do something in or near Washington DC, which is a more convenient location with better public transport than my hometown of Charlottesville.</p>

<p>It all started out as a response to <a href="http://groups.google.com/group/oursql-conference">complaints</a> about MySQL&#8217;s annual conference not being a user&#8217;s conference, but nobody actually doing anything about it.  I decided to do something about it, in a more inclusive way.  And judging by the attendees and talks at the two I&#8217;ve gone to, people were happy to say yes to that.  I think if there are continued events, that&#8217;s the ultimate measure of success.</p>

<p>Related posts:<ol><li><a href="http://www.xaprb.com/blog/2009/08/29/opensql-camp-events-in-2009/" rel="bookmark" title="Permanent Link: OpenSQL Camp events in 2009">OpenSQL Camp events in 2009</a> <small>There are </small></li><li><a href="http://www.xaprb.com/blog/2009/10/19/going-to-opensql-camp-us-2009/" rel="bookmark" title="Permanent Link: Going to OpenSQL Camp US 2009">Going to OpenSQL Camp US 2009</a> <small>I&#8217;ve</small></li><li><a href="http://www.xaprb.com/blog/2009/06/09/opensql-camp-2009-plans-announced/" rel="bookmark" title="Permanent Link: OpenSQL Camp 2009 plans announced">OpenSQL Camp 2009 plans announced</a> <small>I&#8217;m </small></li></ol></p>
<p>Related posts brought to you by <a href="http://mitcho.com/code/yarpp/">Yet Another Related Posts Plugin</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22287&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22287&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 17 Nov 2009 15:32:50 +0000</pubDate>
    <dc:creator>Baron Schwartz (xaprb)</dc:creator>
    <category>Conferences</category>
    <category>OpenSQL Camp</category>
    <category>PostgreSQL</category>
    <category>SQL</category>
  </item>

  <item>
    <title>MySQL Cluster: Geographic Replication Deep-Dive webinar</title>
    <guid isPermaLink="false">http://www.clusterdb.com/?p=681</guid>
    <link>http://www.clusterdb.com/mysql-cluster/mysql-cluster-geographic-replication-deep-dive-webinar/</link>
    <description>I will be presenting a free Webinar on Geographic Replication for MySQL Cluster at 9:00 am (UK time) on Tuesday 24 November.
Multi-Master Replication for HA with MySQL Cluster

MySQL Cluster has been deployed into some of the most demanding web, telecoms and enterprise /
government workloads, supporting 99.999% availability with real time performance and linear write scalability.
You can register on-line here.
Tune into this webinar where you can hear from the MySQL Cluster product management team provide a detailed &amp;#8220;deep dive&amp;#8221; into one of MySQL Cluster&amp;#8217;s key capabilities &amp;#8211; Geographic Replication.
In this session, you will learn how using Geographic Replication enables your applications to:

Achieve higher levels of availability within a data center or across a WAN
Locate data closer to users, providing lower latency access
Replicate to other MySQL storage engines for complex data analysis and reporting of real time data
Gow to get started with Geographic Replication

Tuesday, November 24, 2009: 10:00 Central European time

Tue, Nov 24:  09:00 Western European time
Tue, Nov 24:  11:00 Eastern European time

The presentation will be approximately 1 hour long, including on-line Q&amp;amp;A.</description>
    <content:encoded><![CDATA[<div>I will be presenting a free Webinar on Geographic Replication for MySQL Cluster at 9:00 am (UK time) on Tuesday 24 November.</div>
<div><a href="http://www.clusterdb.com/wp-content/uploads/2009/08/multi_master_replication2.jpg"><img class="size-medium wp-image-409" title="multi_master_replication2" src="http://www.clusterdb.com/wp-content/uploads/2009/08/multi_master_replication2-300x158.jpg" alt="Multi-Master Replication for HA with MySQL Cluster" width="300" height="158" /></a><p>Multi-Master Replication for HA with MySQL Cluster</p></div>
<p></p>
<p>MySQL Cluster has been deployed into some of the most demanding web, telecoms and enterprise /<br />
government workloads, supporting 99.999% availability with real time performance and linear write scalability.</p>
<p>You can <a href="http://www.mysql.com/news-and-events/web-seminars/display-463.html" target="_blank">register on-line here</a>.</p>
<p>Tune into this webinar where you can hear from the MySQL Cluster product management team provide a detailed &#8220;deep dive&#8221; into one of MySQL Cluster&#8217;s key capabilities &#8211; Geographic Replication.</p>
<p>In this session, you will learn how using Geographic Replication enables your applications to:</p>
<ul>
<li>Achieve higher levels of availability within a data center or across a WAN</li>
<li>Locate data closer to users, providing lower latency access</li>
<li>Replicate to other MySQL storage engines for complex data analysis and reporting of real time data</li>
<li>Gow to get started with Geographic Replication</li>
</ul>
<p>Tuesday, November 24, 2009: 10:00 Central European time</p>
<ul>
<li>Tue, Nov 24:  09:00 Western European time</li>
<li>Tue, Nov 24:  11:00 Eastern European time</li>
</ul>
<p>The presentation will be approximately 1 hour long, including on-line Q&amp;A.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22286&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22286&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 17 Nov 2009 14:15:44 +0000</pubDate>
    <dc:creator>Andrew Morgan</dc:creator>
    <category>MySQL Cluster</category>
    <category>MySQL Replication</category>
    <category>HA</category>
    <category>High Availability</category>
    <category>MySQL</category>
  </item>

  <item>
    <title>New version of benchmark scripts also supporting Drizzle</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-14455177.post-6936738247882504971</guid>
    <link>http://mikaelronstrom.blogspot.com/2009/11/new-version-of-benchmark-scripts-also.html</link>
    <description>I updated my benchmark scripts this week. These scripts can nowrun:- Sysbench benchmarks for MySQL and Drizzle- DBT2 benchmarks for MySQL and MySQL Cluster- TPC-W benchmark for MySQL ClusterThere is also a number of scripts to start and stopMySQL, Drizzle and MySQL Cluster nodes.In this version I added Drizzle support for sysbench and alsoadded a README-AUTOMATED file that describes the steps neededto set-up a completely automated sysbench run for MySQLand Drizzle.To run a MySQL sysbench benchmark one needs the DBT2 tarball,the sysbench tarball and a MySQL tarball (gzipped tarballs).The tarball is found on www.iclaustron.com in the downloadssection and this version is named dbt2-0.37.47.tar.gz.</description>
    <content:encoded><![CDATA[I updated my benchmark scripts this week. These scripts can now<br />run:<br /><br />- Sysbench benchmarks for MySQL and Drizzle<br />- DBT2 benchmarks for MySQL and MySQL Cluster<br />- TPC-W benchmark for MySQL Cluster<br /><br />There is also a number of scripts to start and stop<br />MySQL, Drizzle and MySQL Cluster nodes.<br /><br />In this version I added Drizzle support for sysbench and also<br />added a README-AUTOMATED file that describes the steps needed<br />to set-up a completely automated sysbench run for MySQL<br />and Drizzle.<br /><br />To run a MySQL sysbench benchmark one needs the DBT2 tarball,<br />the sysbench tarball and a MySQL tarball (gzipped tarballs).<br /><br />The tarball is found on www.iclaustron.com in the downloads<br />section and this version is named dbt2-0.37.47.tar.gz.<div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/14455177-6936738247882504971?l=mikaelronstrom.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22285&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22285&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 17 Nov 2009 13:00:00 +0000</pubDate>
    <dc:creator>Mikael Ronstr&amp;ouml;m</dc:creator>
  </item>

  <item>
    <title>More patches published</title>
    <guid isPermaLink="false">http://www.facebook.com/note.php?note_id=183311655932</guid>
    <link>http://www.facebook.com/note.php?note_id=183311655932</link>
    <description>I pushed more patches to the Facebook patch for MySQL. Expect more patches as several people are on the team (Domas committed a change today). We will soon be publishing patches for MySQL 5.1. The patches include:

Protect InnoDB LRU during full table scan. This is a backport from the InnoDB plugin version 1.0.5 (pending release in MySQL 5.1.41) and it fixes bug 45015. This adds the my.cnf variables innodb_old_blocks_time and innodb_old_blocks_pct.
Add my.cnf variable innodb_mmap_buffer_pool to allocate memory for InnoDB bufer pool using mmap. Read the code. This is a work in progress.
Provide a fast and non-blocking alternative to FLUSH TABLES WITH READ LOCK. Read this for context. This adds START TRANSACTION WITH CONSISTENT INNODB SNAPSHOT that starts an Innodb transaction and returns the master binlog filename and offset. The command does not block on long running queries. When this is used for backups, replication should be restarted at those return values. The new START command returns 1 row with 2 columns (File, Position) on success. This fixes bug 48124 until MySQL provides the proper fix.
Add my.cnf variable innodb_flush_neighbors_on_checkpoint. This is TRUE by default to match default InnoDB behavior. When FALSE, dirty neighbor pages in an extent are not written to disk during a checkpoint when the min LSN of the oldest dirty page must be advanced. This only changes the behavior when all pages with an old modified LSN are flushed to enforce the checkpoint constraint. This does not modify what is done when pages are flushed for other reasons. This can reduce the rate at which page writes are done. This reverts part of the change added in MySQL 4.0.14. I have written about this several times including here. We need more data from production to determine whether this is useful.
Add FLIFO scheduling for InnoDB. This is described in another note.
</description>
    <content:encoded><![CDATA[I pushed more patches to the <a href="http://code.launchpad.net/~mysqlatfacebook/mysqlatfacebook/trunk">Facebook patch for MySQL</a>. Expect more patches as several people are on the team (Domas committed a change today). We will soon be publishing patches for MySQL 5.1. The patches include:
<ul>
<li>Protect InnoDB LRU during full table scan. This is a backport from the InnoDB plugin version 1.0.5 (pending release in MySQL 5.1.41) and it fixes <a href="http://bugs.mysql.com/bug.php?id=45015">bug 45015</a>. This adds the my.cnf variables <a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-buffer-pool.html">innodb_old_blocks_time and innodb_old_blocks_pct</a>.
<li>Add my.cnf variable innodb_mmap_buffer_pool to allocate memory for InnoDB bufer pool using mmap. Read the code. This is a work in progress.
<li>Provide a fast and non-blocking alternative to FLUSH TABLES WITH READ LOCK. <a href="http://mysqlha.blogspot.com/2009/10/be-careful-with-flush-tables-with-read.html">Read this</a> for context. This adds START TRANSACTION WITH CONSISTENT INNODB SNAPSHOT that starts an Innodb transaction and returns the master binlog filename and offset. The command does not block on long running queries. When this is used for backups, replication should be restarted at those return values. The new START command returns 1 row with 2 columns (File, Position) on success. This fixes <a href="http://bugs.mysql.com/bug.php?id=48124">bug 48124</a> until MySQL provides the proper fix.
<li>Add my.cnf variable innodb_flush_neighbors_on_checkpoint. This is TRUE by default to match default InnoDB behavior. When FALSE, dirty neighbor pages in an extent are not written to disk during a checkpoint when the min LSN of the oldest dirty page must be advanced. This only changes the behavior when all pages with an old modified LSN are flushed to enforce the checkpoint constraint. This does not modify what is done when pages are flushed for other reasons. This can reduce the rate at which page writes are done. This reverts part of the change <a href="http://dev.mysql.com/doc/refman/5.0/fr/innodb-news-4-0-14.html">added in MySQL 4.0.14</a>. I have written about this several times <a href="http://www.facebook.com/note.php?note_id=134892580932">including here</a>. We need more data from production to determine whether this is useful.
<li>Add FLIFO scheduling for InnoDB. This is described in <a href="http://www.facebook.com/note.php?note_id=134892580932#/note.php?note_id=175800920932">another note</a>.
</ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22283&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22283&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 17 Nov 2009 05:09:20 +0000</pubDate>
    <dc:creator>Mark Callaghan</dc:creator>
  </item>

  <item>
    <title>Chicago &amp;amp; Atlanta -last two training locations of the year</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1743</guid>
    <link>http://www.mysqlperformanceblog.com/2009/11/16/chicago-atlanta-last-two-training-locations-of-the-year/</link>
    <description>A final update on training for this year - registration for InnoDB/XtraDB training in Chicago (8th December) and Atlanta (10th December) are now open.
While in Atlanta I'll be giving a talk at the Atlanta PHP User Group on Optimizing MySQL Performance (details to be posted to their website shortly).  If you're in Chicago and would like me to speak at your group on 7th-8th December, let me know!
    
    Entry posted by Morgan Tocker |
      No comment
    Add to:  |  |  |  | </description>
    <content:encoded><![CDATA[<p>A final update on training for this year - registration for <a href="http://www.percona.com/training/performance-optimization-for-mysql-with-innodb-and-xtradb.html">InnoDB/XtraDB training</a> in <a href="http://percona-il-ord.eventbrite.com/">Chicago</a> (8th December) and <a href="http://percona-ga-atl.eventbrite.com/">Atlanta</a> (10th December) are now open.</p>
<p>While in Atlanta I'll be giving a talk at the <a href="http://atlantaphp.org/">Atlanta PHP User Group</a> on Optimizing MySQL Performance (details to be posted to their website shortly).  If you're in Chicago and would like me to speak at your group on 7th-8th December, let me know!</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Morgan Tocker |
      <a href="http://www.mysqlperformanceblog.com/2009/11/16/chicago-atlanta-last-two-training-locations-of-the-year/#comments">No comment</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/11/16/chicago-atlanta-last-two-training-locations-of-the-year/&amp;title=Chicago%20&amp;%20Atlanta%20-last%20two%20training%20locations%20of%20the%20year" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/11/16/chicago-atlanta-last-two-training-locations-of-the-year/&amp;title=Chicago%20&amp;%20Atlanta%20-last%20two%20training%20locations%20of%20the%20year" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/11/16/chicago-atlanta-last-two-training-locations-of-the-year/&amp;title=Chicago%20&amp;%20Atlanta%20-last%20two%20training%20locations%20of%20the%20year" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/11/16/chicago-atlanta-last-two-training-locations-of-the-year/&amp;T=Chicago%20&amp;%20Atlanta%20-last%20two%20training%20locations%20of%20the%20year" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/11/16/chicago-atlanta-last-two-training-locations-of-the-year/&amp;title=Chicago%20&amp;%20Atlanta%20-last%20two%20training%20locations%20of%20the%20year" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22281&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22281&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 16 Nov 2009 22:37:24 +0000</pubDate>
    <dc:creator>Morgan Tocker</dc:creator>
    <category>mysql</category>
  </item>

  <item>
    <title>Interviews for InfiniDB and TokuDB are next</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1736</guid>
    <link>http://www.mysqlperformanceblog.com/2009/11/16/interviews-for-infinidb-and-tokudb-are-next/</link>
    <description>I forwarded on a list of questions about PBXT to Paul McCullagh today.  While Paul's busy answering them, I'd like to announce that Robert Dempsey (InfiniDB storage engine) and Bradley C. Kuszmaul (TokuDB storage engine) have also accepted an interview.  If you have any questions about either storage engine, please post them here by Friday 20th November.
    
    Entry posted by Morgan Tocker |
      No comment
    Add to:  |  |  |  | </description>
    <content:encoded><![CDATA[<p>I forwarded on a <a href="http://www.mysqlperformanceblog.com/2009/11/12/would-you-like-to-ask-a-question-about-pbxt/">list of questions</a> about PBXT to Paul McCullagh today.  While Paul's busy answering them, I'd like to announce that Robert Dempsey (<a href="http://www.infinidb.org/">InfiniDB</a> storage engine) and Bradley C. Kuszmaul (<a href="http://tokutek.com/">TokuDB</a> storage engine) have also accepted an interview.  If you have any questions about either storage engine, please post them here by Friday 20th November.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Morgan Tocker |
      <a href="http://www.mysqlperformanceblog.com/2009/11/16/interviews-for-infinidb-and-tokudb-are-next/#comments">No comment</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/11/16/interviews-for-infinidb-and-tokudb-are-next/&amp;title=Interviews%20for%20InfiniDB%20and%20TokuDB%20are%20next" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/11/16/interviews-for-infinidb-and-tokudb-are-next/&amp;title=Interviews%20for%20InfiniDB%20and%20TokuDB%20are%20next" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/11/16/interviews-for-infinidb-and-tokudb-are-next/&amp;title=Interviews%20for%20InfiniDB%20and%20TokuDB%20are%20next" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/11/16/interviews-for-infinidb-and-tokudb-are-next/&amp;T=Interviews%20for%20InfiniDB%20and%20TokuDB%20are%20next" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/11/16/interviews-for-infinidb-and-tokudb-are-next/&amp;title=Interviews%20for%20InfiniDB%20and%20TokuDB%20are%20next" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22282&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22282&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 16 Nov 2009 21:53:12 +0000</pubDate>
    <dc:creator>Morgan Tocker</dc:creator>
    <category>community</category>
    <category>mysql</category>
    <category>storage engine</category>
  </item>

  <item>
    <title>Table sizes: MyISAM versus InnoDB</title>
    <guid isPermaLink="false">http://www.facebook.com/note.php?note_id=183022275932</guid>
    <link>http://www.facebook.com/note.php?note_id=183022275932</link>
    <description>The 10 largest tables in one production database use 17.8G with InnoDB, 11.1G with MyISAM and 8.6G with packed MyISAM. From tests done by Ryan show that InnoDB compression reduces our database to 59% of the original size. Assuming this holds for the top 10 tables (and I have not tested that), then the result would be 10.5G.

This can save me a lot of work. I expected to add support to MySQL for using different storage engines on the same partitioned table. With that feature, I could use compressed MyISAM for the inactive data and InnoDB for the active data. Now I want to use compressed InnoDB for everything.</description>
    <content:encoded><![CDATA[The 10 largest tables in one production database use 17.8G with InnoDB, 11.1G with MyISAM and 8.6G with packed MyISAM. From <a href="http://www.facebook.com/MySQLatFacebook#/notes/ryan-mack/initial-innodb-compression-test-results/178798260932">tests done by Ryan</a> show that <a href="http://www.innodb.com/products/innodb_plugin/">InnoDB compression</a> reduces our database to 59% of the original size. Assuming this holds for the top 10 tables (and I have not tested that), then the result would be 10.5G.

This can save me a lot of work. I expected to add support to MySQL for using different storage engines on the same partitioned table. With that feature, I could use compressed MyISAM for the inactive data and InnoDB for the active data. Now I want to use compressed InnoDB for everything.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22280&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22280&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 16 Nov 2009 20:12:05 +0000</pubDate>
    <dc:creator>Mark Callaghan</dc:creator>
  </item>

  <item>
    <title>“Shard early, shard often”</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=1730</guid>
    <link>http://www.mysqlperformanceblog.com/2009/11/16/shard-early-shard-often/</link>
    <description>I wrote a post a while back that said why you don't want to shard.  In that post that I tried to explain that hardware advances such as 128G of RAM being so cheap is changing the point at which you need to shard, and that the (often omitted) operational issues created by sharding can be painful.
What I didn't mention was that if you've established that you will need to eventually shard, is it better to just get it out of the way early?  My answer is almost always no. That is to say I disagree with a statement I've been hearing recently; &quot;shard early, shard often&quot;.  Here's why:

There's an order of magnitude better performance that can be gained by focusing on query/index/schema optimization.  The gains from sharding are usually much lower.
If you shard first, and then decide you want to tune query/index/schema to reduce server count, you find yourself in a more difficult position - since you have to apply your changes across all servers.

Or to phrase that another way:
I would never recommend sharding to a customer until I had at least reviewed their slow query log with mk-query-digest and understood exactly why each of the queries in that report were slow.  While we have some customers who have managed to create their own tools for shard automation, it's always easier to propose major changes to how data is stored before you have a cluster of 50+ servers.
    
    Entry posted by Morgan Tocker |
      5 comments
    Add to:  |  |  |  | </description>
    <content:encoded><![CDATA[<p>I wrote a post a while back that said <a href="http://www.mysqlperformanceblog.com/2009/08/06/why-you-dont-want-to-shard/">why you don't want to shard</a>.  In that post that I tried to explain that hardware advances such as 128G of RAM being so cheap is changing the point at which you need to shard, and that the (often omitted) operational issues created by sharding can be painful.</p>
<p>What I didn't mention was that if you've established that you will need to eventually shard, is it better to just <em>get it out of the way early</em>?  My answer is <strong>almost always no</strong>. That is to say I <em>disagree</em> with a statement I've been hearing recently; "shard early, shard often".  Here's why:</p>
<ul>
<li>There's an order of magnitude better performance that can be gained by focusing on query/index/schema optimization.  The gains from sharding are usually much lower.</li>
<li>If you shard first, and then decide you want to tune query/index/schema to reduce server count, you find yourself in a more difficult position - since you have to apply your changes across all servers.</li>
</ul>
<p><em>Or to phrase that another way:<br />
</em>I would never recommend sharding to a customer until I had <strong>at least</strong> reviewed their slow query log with <a href="http://www.maatkit.org/doc/mk-query-digest.html">mk-query-digest</a> and understood <strong>exactly</strong> why each of the queries in that report were slow.  While we have some customers who have managed to create their own tools for shard automation, it's always easier to propose major changes to how data is stored before you have a cluster of 50+ servers.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Morgan Tocker |
      <a href="http://www.mysqlperformanceblog.com/2009/11/16/shard-early-shard-often/#comments">5 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2009/11/16/shard-early-shard-often/&amp;title=%E2%80%9CShard%20early,%20shard%20often%E2%80%9D" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2009/11/16/shard-early-shard-often/&amp;title=%E2%80%9CShard%20early,%20shard%20often%E2%80%9D" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2009/11/16/shard-early-shard-often/&amp;title=%E2%80%9CShard%20early,%20shard%20often%E2%80%9D" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2009/11/16/shard-early-shard-often/&amp;T=%E2%80%9CShard%20early,%20shard%20often%E2%80%9D" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2009/11/16/shard-early-shard-often/&amp;title=%E2%80%9CShard%20early,%20shard%20often%E2%80%9D" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22278&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22278&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 16 Nov 2009 19:59:16 +0000</pubDate>
    <dc:creator>Morgan Tocker</dc:creator>
    <category>mysql</category>
    <category>tips</category>
    <category>shard</category>
    <category>sharding</category>
  </item>

</channel>
</rss>
