<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PlanetMysql.ru - информация о СУБД MySQL &#187; ENGINE</title>
	<atom:link href="http://planetmysql.ru/category/engine/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetmysql.ru</link>
	<description>Блог о самой популярной СУБД MySQL</description>
	<lastBuildDate>Sat, 11 Feb 2012 12:38:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Why a new memory engine may change everything ?</title>
		<link>http://feedproxy.google.com/~r/mysqlplusrss/~3/WQLBW4vY7RM/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=why-a-new-memory-engine-may-change-everything</link>
		<comments>http://feedproxy.google.com/~r/mysqlplusrss/~3/WQLBW4vY7RM/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 16:01:03 +0000</pubDate>
		<dc:creator>Cedric PEINTRE</dc:creator>
				<category><![CDATA[admin]]></category>
		<category><![CDATA[BLOB]]></category>
		<category><![CDATA[dynamic row format]]></category>
		<category><![CDATA[ENGINE]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[max_heap_table_size]]></category>
		<category><![CDATA[memory engine]]></category>
		<category><![CDATA[percona]]></category>
		<category><![CDATA[temporary table]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[tmp_table_size]]></category>

		<guid isPermaLink="false">http://www.mysqlplus.net/?p=84</guid>
		<description><![CDATA[I&#8217;m sure you are aware that the last Percona server release includes a new improved MEMORY storage engine for MySQL.
This new engine is based on Dynamic Row Format and offers some of great features, specialy for VARCHAR, VARBINARY, TEXT and BLOB fields in MEMORY tables.
But because this new MEMORY engine by Percona has some limitations and because Percona server hasn&#8217;t used it for its internal temporary tables yet, I would like to talk about what can be the real benefits to have a brand new MEMORY engine based on Dynamic row format specialy for internal memory tables.
Just remember or discover how MySQL uses internal memory tables

http://dev.mysql.com/doc/refman/5.5/en/internal-temporary-tables.html

And the MEMORY storage engine characteristics and its limitations

http://dev.mysql.com/doc/refman/5.5/en/memory-storage-engine.html

So, the memory storage engine transforms all varchar fields in char fields for internal temporary tables or for user created memory tables. 
1. Let me explain what is the problem with a simple exemple :
I&#8217;ve created an InnoDB table (without index) with two varchar fields (50 &#38; 100) :
mysql&#62; show table status like 'test_memory5'\G
*************************** 1. row ***************************
           Name: test_memory5
         Engine: InnoDB
        Version: 10
     Row_format: Compact
           Rows: 621089
 Avg_row_length: 66
    Data_length: 41484288
Max_data_length: 0
   Index_length: 0
      Data_free: 5242880
 Auto_increment: NULL
    Create_time: 2011-09-21 13:10:17
    Update_time: NULL
     Check_time: NULL
      Collation: latin1_swedish_ci
       Checksum: NULL
 Create_options:
        Comment:
The size of this table is about 48Mb (and more than 600.000 rows) :
-rw-rw---- 1 mysql mysql  48M 2011-09-21 13:11 test_memory5.ibd
Now, I&#8217;m creating a new memory table with exactly the same structure and I&#8217;m setting paramters for memory tables like this :

set tmp_table_size=50*1024*1024;
set max_heap_table_size=50*1024*1024;

That&#8217;s mean I can create a 50Mb max memory table.
Thus, let me insert my 600.000 rows in this table :
mysql&#62; insert into test_memory6 select * from test_memory5;
ERROR 1114 (HY000): The table 'test_memory6' is full
My 50Mb memory table can&#8217;t  contain the 48Mb of the InnoDB table !
Let&#8217;s try with 80Mb :
mysql&#62; set tmp_table_size=80*1024*1024;
Query OK, 0 rows affected (0.00 sec)
mysql&#62; set max_heap_table_size=80*1024*1024;
Query OK, 0 rows affected (0.00 sec)
mysql&#62; insert into test_memory6 select * from test_memory5;
ERROR 1114 (HY000): The table 'test_memory6' is full
And this error occurs until the memory tables can have a 110Mb maximum size !
Why ? Because the two varchar fields of the InnoDB table are converted in char fields with the memory storage engine.
Let&#8217;s see this example from MySQL documentation :



Value
CHAR(4)
Storage Required
VARCHAR(4)
Storage Required




''
'    '
4 bytes
''
1 byte


'ab'
'ab  '
4 bytes
'ab'
3 bytes


'abcd'
'abcd'
4 bytes
'abcd'
5 bytes


'abcdefgh'
'abcd'
4 bytes
'abcd'
5 bytes



By the way, this is a very good reason to take care of your varchar fields.
Conclusion : A memory table can be really bigger than an InnoDB table
2. Let  me explain why a new memory engine may change everything :
Changing the rules for memory tables may change everything for, at least, two reasons :

VARCHAR, VARBINARY, TEXT and BLOB fields will be supported by this new engine for user created memory tables (Percona server can do it with restrictions)
Internal memory tables could be more efficient with Dynamic Row Format

The real benefits will come with internal memory tables, how often do you see that when you &#8220;explain&#8221; your queries :
Extra: Using where; Using temporary; Using filesort
Thus, for each query using a temporary table, MySQL could use less of memory (RAM) !
I don&#8217;t know what would be the real benefit but I am convinced that it can be really significant.
I look forward to see more benchmark about that with last percona server release and I hope that Percona server or MariaDB will support dynamic row format for internal memory tables soon.
Please, let us know if you have already tested this new Percona Memory engine.
Related Posts :Did you know optimize table can reset your auto-increment ?Does mpstat can replace vmstat ?Fatal timeout ![UPDATED] Why you should go to Percona Live (London) ?]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure you are aware that the last <a href="http://www.mysqlperformanceblog.com/2011/08/31/percona-server-5-5-15-21-0/" >Percona server</a> release includes a new improved <em><a href="http://www.percona.com/docs/wiki/percona-server%3Afeatures%3Aimproved_memory_engine" >MEMORY </a></em>storage engine for MySQL.<br />
This new engine is based on <em>Dynamic Row Format </em>and offers some of great features, specialy for <em>VARCHAR</em>, <em>VARBINARY</em>, <em>TEXT</em> and <em>BLOB</em> fields in <em>MEMORY</em> tables.</p>
<p>But because this new <em>MEMORY</em> engine by Percona has some limitations and because Percona server hasn&#8217;t used it for its internal temporary tables yet, I would like to talk about what can be the real benefits to have a brand new <em>MEMORY</em> engine based on <em>Dynamic row format</em> specialy for internal memory tables.</p>
<p>Just remember or discover how MySQL uses internal memory tables</p>
<ul>
<li><a href="http://dev.mysql.com/doc/refman/5.5/en/internal-temporary-tables.html" >http://dev.mysql.com/doc/refman/5.5/en/internal-temporary-tables.html</a></li>
</ul>
<p>And the <em>MEMORY</em> storage engine characteristics and its limitations</p>
<ul>
<li><a href="http://dev.mysql.com/doc/refman/5.5/en/memory-storage-engine.html" >http://dev.mysql.com/doc/refman/5.5/en/memory-storage-engine.html</a></li>
</ul>
<p>So, the <em>memory</em> storage engine transforms all <em>varchar</em> fields in <em>char</em> fields for internal temporary tables or for user created <em>memory</em> tables. <strong></strong></p>
<p><strong><span>1. Let me explain what is the problem with a simple exemple :</span></strong></p>
<p>I&#8217;ve created an InnoDB table (without index) with two <em>varchar</em> fields (50 &amp; 100) :</p>
<pre>mysql&gt; show table status like 'test_memory5'\G
*************************** 1. row ***************************
           Name: test_memory5
         Engine: InnoDB
        Version: 10
     Row_format: Compact
           Rows: <strong>621089</strong>
 Avg_row_length: 66
<strong>    Data_length: 41484288</strong>
Max_data_length: 0
   Index_length: 0
<strong>      Data_free: 5242880</strong>
 Auto_increment: NULL
    Create_time: 2011-09-21 13:10:17
    Update_time: NULL
     Check_time: NULL
      Collation: latin1_swedish_ci
       Checksum: NULL
 Create_options:
        Comment:</pre>
<p>The size of this table is about <strong>48Mb</strong> (and more than 600.000 rows) :</p>
<pre>-rw-rw---- 1 mysql mysql  <strong>48M</strong> 2011-09-21 13:11 test_memory5.ibd</pre>
<p>Now, I&#8217;m creating a new <em>memory</em> table with exactly the same structure and I&#8217;m setting paramters for <em>memory</em> tables like this :</p>
<ul>
<li>set tmp_table_size=50*1024*1024;</li>
<li>set max_heap_table_size=50*1024*1024;</li>
</ul>
<p>That&#8217;s mean I can create a <strong>50Mb</strong> max memory table.<br />
Thus, let me insert my 600.000 rows in this table :</p>
<pre>mysql&gt; insert into test_memory6 select * from test_memory5;
<strong>ERROR 1114 (HY000): The table 'test_memory6' is full</strong></pre>
<p>My <strong>50Mb</strong> memory table can&#8217;t  contain the 48Mb of the InnoDB table !<br />
Let&#8217;s try with <strong>80Mb</strong> :</p>
<pre>mysql&gt; set tmp_table_size=80*1024*1024;
Query OK, 0 rows affected (0.00 sec)
mysql&gt; set max_heap_table_size=80*1024*1024;
Query OK, 0 rows affected (0.00 sec)
mysql&gt; insert into test_memory6 select * from test_memory5;
<strong>ERROR 1114 (HY000): The table 'test_memory6' is full</strong></pre>
<p>And this error occurs until the <em>memory</em> tables can have a <strong>110Mb</strong> maximum size !</p>
<p>Why ? Because the two <em>varchar</em> fields of the InnoDB table are converted in <em>char</em> fields with the memory storage engine.<br />
Let&#8217;s see this example from MySQL documentation :</p>
<table border="1">
<thead>
<tr>
<th>Value</th>
<th><code>CHAR(4)</code></th>
<th>Storage Required</th>
<th><code>VARCHAR(4)</code></th>
<th>Storage Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>''</code></td>
<td><code>'    '</code></td>
<td>4 bytes</td>
<td><code>''</code></td>
<td>1 byte</td>
</tr>
<tr>
<td><code>'ab'</code></td>
<td><code>'ab  '</code></td>
<td>4 bytes</td>
<td><code>'ab'</code></td>
<td>3 bytes</td>
</tr>
<tr>
<td><code>'abcd'</code></td>
<td><code>'abcd'</code></td>
<td>4 bytes</td>
<td><code>'abcd'</code></td>
<td>5 bytes</td>
</tr>
<tr>
<td><code>'abcdefgh'</code></td>
<td><code>'abcd'</code></td>
<td>4 bytes</td>
<td><code>'abcd'</code></td>
<td>5 bytes</td>
</tr>
</tbody>
</table>
<p>By the way, this is a very good reason to take care of your <em>varchar</em> fields.</p>
<p><strong>Conclusion :</strong> A memory table can be really bigger than an InnoDB table</p>
<p><span><strong>2. Let  me explain why a new <em>memory</em> engine may change everything :</strong></span></p>
<p>Changing the rules for <em>memory</em> tables may change everything for, at least, two reasons :</p>
<ul>
<li><em>VARCHAR</em>, <em>VARBINARY</em>, <em>TEXT</em> and <em>BLOB</em> fields will be supported by this new engine for user created <em>memory</em> tables (Percona server can do it with restrictions)</li>
<li><strong>Internal <em>memory</em> tables could be more efficient with <em>Dynamic Row Format</em></strong></li>
</ul>
<div>The real benefits will come with internal <em>memory</em> tables, how often do you see that when you &#8220;<em>explain&#8221;</em> your queries :</div>
<pre>Extra: Using where; <strong>Using temporary</strong>; Using filesort</pre>
<p>Thus, for each query using a temporary table, MySQL could use less of memory (RAM) !<br />
I don&#8217;t know what would be the real benefit but I am convinced that it can be really significant.</p>
<p>I look forward to see more benchmark about that with last percona server release and I hope that Percona server or MariaDB will support dynamic row format for internal <em>memory</em> tables soon.</p>
<p>Please, let us know if you have already tested this new Percona <em>Memory</em> engine.</p>
<div><B><U>Related Posts :</U></B><ul><li><a href="http://www.mysqlplus.net/2011/07/12/optimize-table-reset-auto-increment/" rel="bookmark">Did you know <i>optimize table</i> can reset your auto-increment ?</a></li><li><a href="http://www.mysqlplus.net/2011/07/06/mpstat-replace-vmstat/" rel="bookmark">Does <i>mpstat</i> can replace <i>vmstat</i> ?</a></li><li><a href="http://www.mysqlplus.net/2011/07/07/fatal-timeout/" rel="bookmark">Fatal timeout !</a></li><li><a href="http://www.mysqlplus.net/2011/09/22/percona-live/" rel="bookmark">[UPDATED] Why you should go to Percona Live (London) ?</a></li></ul></div><div>
<a href="http://feeds.feedburner.com/~ff/mysqlplusrss?a=WQLBW4vY7RM:gLSJksuWHEE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/mysqlplusrss?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/mysqlplusrss?a=WQLBW4vY7RM:gLSJksuWHEE:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/mysqlplusrss?i=WQLBW4vY7RM:gLSJksuWHEE:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/mysqlplusrss?a=WQLBW4vY7RM:gLSJksuWHEE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/mysqlplusrss?i=WQLBW4vY7RM:gLSJksuWHEE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/mysqlplusrss?a=WQLBW4vY7RM:gLSJksuWHEE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/mysqlplusrss?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/mysqlplusrss/~4/WQLBW4vY7RM" height="1" width="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=30097&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=30097&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/09/26/why-a-new-memory-engine-may-change-everything/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Federated Tables</title>
		<link>http://www.mysqlfanboy.com/2010/07/federated-tables/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=federated-tables</link>
		<comments>http://www.mysqlfanboy.com/2010/07/federated-tables/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 15:55:47 +0000</pubDate>
		<dc:creator>Mark Grennan</dc:creator>
				<category><![CDATA[data]]></category>
		<category><![CDATA[ENGINE]]></category>
		<category><![CDATA[federated]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[remote server]]></category>
		<category><![CDATA[Tables]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.mysqlfanboy.com/?p=234</guid>
		<description><![CDATA[Your searching for how to create a join across two databases on two different servers and it can&#8217;t be done directly.   select  d1.a, d2.b from db1@server1 join db2@server2 where db1.c = db2.c; does not work.
You learn about federated databases.  The federated storage engine allows accesses     data in tables of remote databases.  Now how do you make it work?
1) Check if the federated storage engine is supported.  Federation is OFF by default!
mysql&#62; show engines;
+------------+---------+----------------------------------------------------------------+
&#124; Engine     &#124; Support &#124; Comment                                                        &#124;
+------------+---------+----------------------------------------------------------------+
&#124; InnoDB     &#124; YES     &#124; Supports transactions, row-level locking, and foreign keys     &#124;
&#124; MyISAM     &#124; DEFAULT &#124; Default engine as of MySQL 3.23 with great performance         &#124;
&#124; BLACKHOLE  &#124; YES     &#124; /dev/null storage engine (anything you write to it disappears) &#124;
&#124; CSV        &#124; YES     &#124; CSV storage engine                                             &#124;
&#124; MEMORY     &#124; YES     &#124; Hash based, stored in memory, useful for temporary tables      &#124;
&#124; FEDERATED  &#124; YES     &#124; Federated MySQL storage engine                                 &#124;
&#124; ARCHIVE    &#124; YES     &#124; Archive storage engine                                         &#124;
&#124; MRG_MYISAM &#124; YES     &#124; Collection of identical MyISAM tables                          &#124;
+------------+---------+----------------------------------------------------------------+

If it is not &#8220;Support&#8221;ed (on) you need to add &#8216;federated=ON&#8216; to the [mysqld] section of your /etc/my.cnf file.  I found this section to be a bit troublesome.  It must be &#8216;=ON&#8217; not &#8216;=YES&#8221; or even &#8216;=on&#8217;.   Most options allow these but the federated options is picky.  I&#8217;m running MySQL Enterprise 5.1.37.sp1.
2) If you don&#8217;t already have the database created, create the database on the storage server.  By &#8216;storage server&#8217; I mean the one where the data will be written to disk.
I like to create a user just for the purpose of connection the federated copy of the database to the true database.  This way, if the password gets changed or the user deleted, the federated system can continue to connect.

mysql&#62; CREATE DATABASE xfiles;
mysql&#62; USE xfiles;
mysql&#62; CREATE TABLE cases(
 Name VARCHAR(20),
 case TINYINT(3),
) ENGINE = INNODB;

3) Now you can create the federated version of your data on the remote system.
mysql&#62; CREATE DATABASE xfiles;
mysql&#62; USE xfiles;
mysql&#62; CREATE TABLE cases(
 Name VARCHAR(20),
 case TINYINT(3),
) ENGINE = FEDERATED
CONNECTION = 'mysql://skiner:c0nsper@fbi/xfiles/cases';
4) Check your work. The table status should show Engine: FEDERATED.
mysql&#62; use xfiles;
mysql&#62; show table status\G
Now you can add records to the table and the data should show up in select on either server.
Enjoy.
]]></description>
			<content:encoded><![CDATA[<p>Your searching for how to create a join across two databases on two different servers and it can&#8217;t be done directly.   <em><strong>select  d1.a, d2.b from db1@server1 join db2@server2 where db1.c = db2.c;</strong></em> does not work.</p>
<p>You learn about federated databases.  The federated storage engine allows accesses     data in tables of remote databases.  Now how do you make it work?</p>
<p>1) Check if the federated storage engine is supported.  <strong>Federation is OFF by default!</strong></p>
<pre>mysql&gt; show engines;
+------------+---------+----------------------------------------------------------------+
| Engine     | Support | Comment                                                        |
+------------+---------+----------------------------------------------------------------+
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys     |
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance         |
| BLACKHOLE  | YES     | /dev/null storage engine (anything you write to it disappears) |
| CSV        | YES     | CSV storage engine                                             |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables      |
| <strong>FEDERATED  </strong>| <strong>YES     </strong>| Federated MySQL storage engine                                 |
| ARCHIVE    | YES     | Archive storage engine                                         |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                          |
+------------+---------+----------------------------------------------------------------+
</pre>
<p>If it is not &#8220;Support&#8221;ed (on) you need to add &#8216;<strong>federated=ON</strong>&#8216; to the <strong>[mysqld]</strong> section of your <strong>/etc/my.cnf</strong> file.  I found this section to be a bit troublesome.  It must be &#8216;=ON&#8217; not &#8216;=YES&#8221; or even &#8216;=on&#8217;.   Most options allow these but the federated options is picky.  I&#8217;m running MySQL Enterprise 5.1.37.sp1.</p>
<p>2) If you don&#8217;t already have the database created, create the database on the storage server.  By &#8216;storage server&#8217; I mean the one where the data will be written to disk.</p>
<p>I like to create a user just for the purpose of connection the federated copy of the database to the true database.  This way, if the password gets changed or the user deleted, the federated system can continue to connect.</p>
<pre>
<pre>mysql&gt; CREATE DATABASE xfiles;
mysql&gt; USE xfiles;
mysql&gt; CREATE TABLE cases(
 Name VARCHAR(20),
 case TINYINT(3),
) ENGINE = INNODB;</pre>
</pre>
<p>3) Now you can create the federated version of your data on the remote system.</p>
<pre>mysql&gt; CREATE DATABASE xfiles;
mysql&gt; USE xfiles;
mysql&gt; CREATE TABLE cases(
 Name VARCHAR(20),
 case TINYINT(3),
) ENGINE = FEDERATED
CONNECTION = 'mysql://skiner:c0nsper@fbi/xfiles/cases';</pre>
<p>4) Check your work. The table status should show Engine: FEDERATED.</p>
<pre>mysql&gt; use xfiles;
mysql&gt; show table status\G</pre>
<p>Now you can add records to the table and the data should show up in select on either server.</p>
<p>Enjoy.</p>
<p><img class="alignnone" title="Mark Grennan" src="http://mark.grennan.com/images/MarkGrennanSigniture.bmp" alt="" width="166" height="69" /></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=25251&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=25251&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/07/07/federated-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GRAPH engine – Mk.II</title>
		<link>http://openquery.com/blog/graph-engine-mkii?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=graph-engine-%25e2%2580%2593-mk-ii</link>
		<comments>http://openquery.com/blog/graph-engine-mkii#comments</comments>
		<pubDate>Fri, 16 Oct 2009 15:57:03 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[ENGINE]]></category>
		<category><![CDATA[friend of a friend]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[GRAPH engine]]></category>
		<category><![CDATA[Graphs]]></category>
		<category><![CDATA[hierarchies]]></category>
		<category><![CDATA[hierarchy]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Open Query]]></category>
		<category><![CDATA[shortest path]]></category>
		<category><![CDATA[social graph]]></category>
		<category><![CDATA[tree]]></category>
		<category><![CDATA[tree traversal]]></category>
		<category><![CDATA[trees]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1023</guid>
		<description><![CDATA[The GRAPH engine allows you to deal with hierarchies and graphs in a purely relational way. So, we can find all children of an item, path from an item to a root node, shortest path between two items, and so on, each with a simple basic query structure using standard SQL grammar.
The engine is implemented as a MySQL/MariaDB 5.1 plugin (we&#8217;re working on a 5.0 backport for some clients) and thus runs with an unmodified server.
Demo time! I&#8217;ll simplify/strip a little bit here for space reasons, but what&#8217;s here is plain cut/paste from a running server, no edits
-- insert a few entries with connections (and multiple paths)
insert into foo (origid, destid) values (1,2), (2,3), (2,4), (4,5), (3,6), (5,6);
-- a regular table to join on to
insert into people values (1,"pearce"),(2,"hunnicut"),(3,"potter"),
                          (4,"hoolihan"),(5,"winchester"),(6,"mulcahy");
-- find us the shortest path from pearce (1) to mulcahy (6) please
select group_concat(people.name order by seq) as path
  from foo join people on (foo.linkid=people.id)
  where latch=1 and origid=1 and destid=6;
+--------+--------+--------------------------------+
&#124; origid &#124; destid &#124; path                           &#124;
+--------+--------+--------------------------------+
&#124;      1 &#124;      6 &#124; pearce,hunnicut,potter,mulcahy &#124;
+--------+--------+--------------------------------+
-- find us all people we can get to from potter (3)
select origid,group_concat(people.name order by seq) as destinations
  from foo join people on (foo.linkid=people.id)
  where latch=1 and origid=3;
+--------+----------------+
&#124; origid &#124; destinations   &#124;
+--------+----------------+
&#124;      3 &#124; mulcahy,potter &#124;
+--------+----------------+

-- find us all people from where we can get to hoolihan (4)
select origid,group_concat(people.name order by seq) as origins
  from foo join people on (foo.linkid=people.id)
  where latch=1 and destid=4;
+--------+--------------------------+
&#124; origid &#124; origins                  &#124;
+--------+--------------------------+
&#124;      4 &#124; hoolihan,hunnicut,pearce &#124;
+--------+--------------------------+
So, there you have it. A graph (in this case a simple unidirectional tree, aka hierarchy) that looks like a table to us, as do the resultsets that have been computed.
This is still a early implementation, we&#8217;re still enhancing the storage efficiency (in memory) and speed, and adding persistence. We&#8217;re also looking for a suitable large dataset that would allow us to seriously test the system, find bugs and assess speed. If you happen to have a large hierarchical structure, but especially a social graph you could obfuscate and give to us, that would be great!
Also, if you&#8217;re interested in deploying the GRAPH engine or have questions or additional needs, we&#8217;d be happy to talk with you.
select origid,group_concat(people.name order by seq) as destinations from foo join people on (foo.linkid=people.id) where latch=1 and origid=4;
+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+
&#124; origid &#124; destinations                &#124;
+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+
&#124;      4 &#124; mulcahy,winchester,hoolihan &#124;
+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://openquery.com/products/graph-engine">GRAPH engine</a> allows you to deal with hierarchies and graphs in a purely relational way. So, we can find all children of an item, path from an item to a root node, shortest path between two items, and so on, each with a simple basic query structure using standard SQL grammar.</p>
<p>The engine is implemented as a MySQL/MariaDB 5.1 plugin (we&#8217;re working on a 5.0 backport for some clients) and thus runs with an unmodified server.</p>
<p>Demo time! I&#8217;ll simplify/strip a little bit here for space reasons, but what&#8217;s here is plain cut/paste from a running server, no edits</p>
<pre>-- insert a few entries with connections (and multiple paths)
insert into foo (origid, destid) values (1,2), (2,3), (2,4), (4,5), (3,6), (5,6);
-- a regular table to join on to
insert into people values (1,"pearce"),(2,"hunnicut"),(3,"potter"),
                          (4,"hoolihan"),(5,"winchester"),(6,"mulcahy");</pre>
<pre>-- find us the shortest path from pearce (1) to mulcahy (6) please
select group_concat(people.name order by seq) as path
  from foo join people on (foo.linkid=people.id)
  where latch=1 and origid=1 and destid=6;
+--------+--------+--------------------------------+
| origid | destid | path                           |
+--------+--------+--------------------------------+
|      1 |      6 | pearce,hunnicut,potter,mulcahy |
+--------+--------+--------------------------------+</pre>
<pre>-- find us all people we can get to from potter (3)
select origid,group_concat(people.name order by seq) as destinations
  from foo join people on (foo.linkid=people.id)
  where latch=1 and origid=3;
+--------+----------------+
| origid | destinations   |
+--------+----------------+
|      3 | mulcahy,potter |
+--------+----------------+

-- find us all people from where we can get to hoolihan (4)
select origid,group_concat(people.name order by seq) as origins
  from foo join people on (foo.linkid=people.id)
  where latch=1 and destid=4;
+--------+--------------------------+
| origid | origins                  |
+--------+--------------------------+
|      4 | hoolihan,hunnicut,pearce |
+--------+--------------------------+</pre>
<p>So, there you have it. A graph (in this case a simple unidirectional tree, aka hierarchy) that looks like a table to us, as do the resultsets that have been computed.</p>
<p>This is still a early implementation, we&#8217;re still enhancing the storage efficiency (in memory) and speed, and adding persistence. We&#8217;re also looking for a suitable large dataset that would allow us to seriously test the system, find bugs and assess speed. If you happen to have a large hierarchical structure, but especially a social graph you could obfuscate and give to us, that would be great!</p>
<p>Also, if you&#8217;re interested in deploying the <a href="http://openquery.com/products/graph-engine">GRAPH engine</a> or have questions or additional needs, we&#8217;d be happy to <a href="http://openquery.com/contact">talk</a> with you.</p>
<div>select origid,group_concat(people.name order by seq) as destinations from foo join people on (foo.linkid=people.id) where latch=1 and origid=4;<br />
+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| origid | destinations                |<br />
+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
|      4 | mulcahy,winchester,hoolihan |<br />
+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+</div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21748&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21748&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/10/16/graph-engine-%e2%80%93-mk-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL University: The Spider Storage Engine</title>
		<link>http://blogs.sun.com/mysqlf/entry/mysql_university_the_spider_storage?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-university-the-spider-storage-engine</link>
		<comments>http://blogs.sun.com/mysqlf/entry/mysql_university_the_spider_storage#comments</comments>
		<pubDate>Mon, 12 Oct 2009 18:24:58 +0000</pubDate>
		<dc:creator>Stefan Hinz</dc:creator>
				<category><![CDATA[ENGINE]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Spider]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://blogs.sun.com/mysqlf/entry/mysql_university_the_spider_storage</guid>
		<description><![CDATA[This Thursday (October 15th, 13:00 UTC), Giuseppe Maxia will present the Spider Storage Engine. Here's from the abstract: Everybody needs sharding. Which is not easy to maintain. Being tied to
the application layer, sharding is hard to export and to interact with.
The Spider storage engine, a plugin for MySQL 5.1 and later, solves the
problem in a transparent way. It is an extension of partitioning. Using this
engine, the user can deal transparently with multiple backends in the
server layer. This means that the data is accessible from any
application without code changes. This lecture will briefly introduce
MySQL partitioning, and then show how to create and use the Spider
engine, with some practical examples. The talk covers the latest
version of the Spider engine, which includes a condition pushdown
feature that increases performance significantly.  
  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 upcoming weeks: 
   
    October 22: Dual Master Setups With MMM (Arjen Lentz) 
    October 29: MySQL scalability on SPARC &#38; INTEL X5500 (Nehalem) (Benoit Chaffanjon) 
    November 12: Gearman for MySQL (Giuseppe Maxia) 
    November 19: memcached Functions for MySQL (UDFs) (Patrick Galbraith) 
    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 (October 15th, 13:00 UTC), Giuseppe Maxia will present <a href="http://forge.mysql.com/wiki/The_Spider_Storage_Engine" title="The Spider Storage Engine">the Spider Storage Engine</a>. Here's from the abstract: Everybody needs <a href="http://en.wikipedia.org/wiki/Shard_(database_architecture)" >sharding</a>. Which is not easy to maintain. Being tied to
the application layer, sharding is hard to export and to interact with.
The Spider storage engine, a plugin for MySQL 5.1 and later, solves the
problem in a transparent way. It is an extension of partitioning. Using this
engine, the user can deal transparently with multiple backends in the
server layer. This means that the data is accessible from any
application without code changes. This lecture will briefly introduce
MySQL partitioning, and then show how to create and use the Spider
engine, with some practical examples. The talk covers the latest
version of the Spider engine, which includes a condition pushdown
feature that increases performance significantly. </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 upcoming weeks:</p> 
  <ul> 
    <li>October 22: Dual Master Setups With MMM (Arjen Lentz)</li> 
    <li>October 29: MySQL scalability on SPARC &amp; INTEL X5500 (Nehalem) (Benoit Chaffanjon)</li> 
    <li>November 12: Gearman for MySQL (Giuseppe Maxia)</li> 
    <li>November 19: memcached Functions for MySQL (UDFs) (Patrick Galbraith)</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.<br /> </p> 
  <div><img clueid="favIcon" src="chrome://interclue/content/cluecore/skins/default/pixel.gif" style="border: 0px solid #ff0000 ! important; margin: 0pt; padding: 0pt ! important; background: transparent url(http://forge.mysql.com/favicon.ico) no-repeat scroll center center ! important; overflow: visible ! important; float: none ! important; width: 16px ! important; height: 16px ! important; display: none; position: absolute ! important; text-indent: 0px ! important; z-index: 2147483635 ! important; max-width: none ! important; min-width: 0pt ! important; max-height: none ! important; min-height: 0pt ! important; left: 706px; top: 258px; bottom: auto ! important; right: auto ! important; line-height: 16px ! important; white-space: nowrap ! important; visibility: hidden; -moz-background-clip: border ! important; -moz-background-origin: padding ! important; -moz-background-inline-policy: continuous ! important; opacity: 0;" class="linkscent-icon" /><img width="16" height="16" src="chrome://interclue/content/cluecore/skins/default/pixel.gif" clueid="bookmarked" style="border: 0px solid #ff0000 ! important; margin: 0pt; padding: 0pt ! important; background: transparent url(chrome://interclue/content/cluecore/skins/default/sprites.png) no-repeat scroll -8px 0px; overflow: visible ! important; float: none ! important; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: 16px ! important; height: 16px ! important; display: none; position: absolute ! important; text-indent: 0px ! important; z-index: 2147483635 ! important; max-width: none ! important; min-width: 0pt ! important; max-height: none ! important; min-height: 0pt ! important; left: 724px; top: 258px; bottom: auto ! important; right: auto ! important; line-height: 16px ! important; white-space: nowrap ! important; visibility: hidden; opacity: 0;" class="linkscent-icon" /><img clueid="clueIcon" src="chrome://interclue/content/cluecore/skins/default/pixel.gif" style="border: 0px solid #ff0000 ! important; margin: 0pt; padding: 0pt ! important; background: transparent none repeat scroll center center; overflow: visible ! important; float: none ! important; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: 16px ! important; height: 16px ! important; display: none; position: absolute ! important; text-indent: 0px ! important; z-index: 2147483635 ! important; max-width: none ! important; min-width: 0pt ! important; max-height: none ! important; min-height: 0pt ! important; left: 742px; top: 258px; bottom: auto ! important; right: auto ! important; line-height: 16px ! important; white-space: nowrap ! important; visibility: hidden; opacity: 0;" class="linkscent-icon" /><img clueid="favIcon" src="chrome://interclue/content/cluecore/skins/default/pixel.gif" style="border: 0px solid #ff0000 ! important; margin: 0pt; padding: 0pt ! important; background: transparent url(http://forge.mysql.com/favicon.ico) no-repeat scroll center center ! important; overflow: visible ! important; float: none ! important; width: 16px ! important; height: 16px ! important; display: none; position: absolute ! important; text-indent: 0px ! important; z-index: 2147483635 ! important; max-width: none ! important; min-width: 0pt ! important; max-height: none ! important; min-height: 0pt ! important; left: 124px; top: 692px; bottom: auto ! important; right: auto ! important; line-height: 16px ! important; white-space: nowrap ! important; visibility: hidden; -moz-background-clip: border ! important; -moz-background-origin: padding ! important; -moz-background-inline-policy: continuous ! important; opacity: 0;" class="linkscent-icon" /><img clueid="clueIcon" src="chrome://interclue/content/cluecore/skins/default/pixel.gif" style="border: 0px solid #ff0000 ! important; margin: 0pt; padding: 0pt ! important; background: transparent none repeat scroll center center; overflow: visible ! important; float: none ! important; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: 16px ! important; height: 16px ! important; display: none; position: absolute ! important; text-indent: 0px ! important; z-index: 2147483635 ! important; max-width: none ! important; min-width: 0pt ! important; max-height: none ! important; min-height: 0pt ! important; left: 142px; top: 692px; bottom: auto ! important; right: auto ! important; line-height: 16px ! important; white-space: nowrap ! important; visibility: hidden; opacity: 0;" class="linkscent-icon" /><img clueid="favIcon" src="chrome://interclue/content/cluecore/skins/default/pixel.gif" style="border: 0px solid #ff0000 ! important; margin: 0pt; padding: 0pt ! important; background: transparent url(http://forge.mysql.com/favicon.ico) no-repeat scroll center center ! important; overflow: visible ! important; float: none ! important; width: 16px ! important; height: 16px ! important; display: none; position: absolute ! important; text-indent: 0px ! important; z-index: 2147483635 ! important; max-width: none ! important; min-width: 0pt ! important; max-height: none ! important; min-height: 0pt ! important; left: 354px; top: 61px; bottom: auto ! important; right: auto ! important; line-height: 16px ! important; white-space: nowrap ! important; visibility: hidden; -moz-background-clip: border ! important; -moz-background-origin: padding ! important; -moz-background-inline-policy: continuous ! important; opacity: 0;" class="linkscent-icon" /><img clueid="clueIcon" src="chrome://interclue/content/cluecore/skins/default/pixel.gif" style="border: 0px solid #ff0000 ! important; margin: 0pt; padding: 0pt ! important; background: transparent none repeat scroll center center; overflow: visible ! important; float: none ! important; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: 16px ! important; height: 16px ! important; display: none; position: absolute ! important; text-indent: 0px ! important; z-index: 2147483635 ! important; max-width: none ! important; min-width: 0pt ! important; max-height: none ! important; min-height: 0pt ! important; left: 372px; top: 61px; bottom: auto ! important; right: auto ! important; line-height: 16px ! important; white-space: nowrap ! important; visibility: hidden; opacity: 0;" class="linkscent-icon" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21683&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21683&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/10/12/mysql-university-the-spider-storage-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comparison Between Solr And Sphinx Search Servers (Solr Vs Sphinx – Fight!)</title>
		<link>http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-%25e2%2580%2593-fight</link>
		<comments>http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 17:00:00 +0000</pubDate>
		<dc:creator>Artem Russakovskii</dc:creator>
				<category><![CDATA[backend]]></category>
		<category><![CDATA[compare]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[ENGINE]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[fulltext]]></category>
		<category><![CDATA[indexing]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Solr]]></category>
		<category><![CDATA[sphinx]]></category>

		<guid isPermaLink="false">http://beerpla.net/2009/09/03/detailed-comparison-between-solr-and-sphinx/</guid>
		<description><![CDATA[
		
		
		
		In the past few weeks I&#39;ve been implementing advanced search at Plaxo, working quite closely with Solr enterprise search server. Today, I saw this relatively detailed comparison between Solr and its main competitor Sphinx (full credit goes to StackOverflow user mausch who had been using Solr for the past 2 years). For those still confused, Solr and Sphinx are similar to MySQL FULLTEXT search, or for those even more confused, think Google (yeah, this is a bit of a stretch, I know).
Similarities

Both Solr and Sphinx satisfy all of your requirements. They&#39;re fast and designed to index and search large bodies of data efficiently. 
Both have a long list of high-traffic sites using them (Solr, Sphinx) 
Both offer commercial support. (Solr, Sphinx) 
Both offer client API bindings for several platforms/languages (Sphinx, Solr) 
Both can be distributed to increase speed and capacity (Sphinx, Solr) 

Here are some differences

Solr, being an Apache project, is obviously is Apache2-licensed. Sphinx is GPLv2. This means that if you ever need to embed or extend (not just &#34;use&#34;) Sphinx in a commercial application, you&#39;ll have to buy a commercial license. 
Solr is easily embeddable in Java applications. 
Solr is built on top of Lucene, which is a proven technology over 7 years old with a huge user base (this is only a small part). Whenever Lucene gets a new feature or speedup, Solr gets it too. Many of the devs committing to Solr are also Lucene committers. 
Sphinx integrates more tightly with RDBMSs, especially MySQL. 
Solr can be integrated with Hadoop to build distributed applications
Solr can be integrated with Nutch to quickly build a fully-fledged web search engine with crawler. 
Solr can index proprietary formats like Microsoft Word, PDF, etc. Sphinx can&#39;t. 
Solr comes with a spell-checker out of the box. 
Solr comes with facet support out of the box. Faceting in Sphinx takes more work. 
Sphinx doesn&#39;t allow partial index updates for field data. 
In Sphinx, all document ids must be unique unsigned non-zero integer numbers. Solr doesn&#39;t even require a unique key for many operations, and unique keys can be either integers or strings. 
Solr supports field collapsing to avoid duplicating similar results. Sphinx doesn&#39;t seem to provide any feature like this. 

Related questions

http://stackoverflow.com/questions/1284083/choosing-a-stand-alone-full-text-search-server-sphinx-or-solr
http://stackoverflow.com/questions/1132284/full-text-searching-with-rails
http://stackoverflow.com/questions/737275/pros-cons-of-full-text-search-engine-lucene-sphinx-postgresql-full-text-searc

Conclusion
In my experience, Solr is very-very fast on the query side. It is also very powerful. The indexing side is very CPU and memory intensive and is an unfortunate side effect of having such a feature-rich, fast application. Nevertheless, I highly recommend Solr.
For disclaimer purposes, I have not had much experience with Sphinx and, again, all credit for this comparison goes to mausch.
&#160;Tweet This!Share this on del.icio.usDigg this!Share this on RedditStumble upon something good? Share it on StumbleUponShare this on FacebookShare this on LinkedinSimilar Posts:Hidden Features Of Perl, PHP, Javascript, C, C++, C#, Java, Ruby, Python, And Others [Collection Of Incredibly Useful Lists]

Delicious.com [Quietly] Rolls Out Domain And Url Searching/Filtering. Finally!

Top 10 Reasons Why Digsby ROCKS

My MySQL Conference Schedule

MySQL Indexing Considerations Of Implementing A Priority Field In Your Application
]]></description>
			<content:encoded><![CDATA[<div><a href="http://api.tweetmeme.com/share?url=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/" height="61" width="51" /></a></div><!--S-ButtonZ 1.1.4 Start--><div>
		
		</div><div>
		
		</div><!--S-ButtonZ 1.1.4 End--><p>In the past few weeks I&#039;ve been implementing advanced search at <a href="http://www.plaxo.com" rel="nofollow">Plaxo</a>, working quite closely with <a href="http://lucene.apache.org/solr/" rel="nofollow">Solr</a> enterprise search server. Today, I saw this relatively detailed comparison between Solr and its main competitor <a href="http://www.sphinxsearch.com/" rel="nofollow">Sphinx</a> (full credit goes to StackOverflow user <a href="http://stackoverflow.com/users/21239/mausch" rel="nofollow">mausch</a> who had been using Solr for the past 2 years). For those still confused, Solr and Sphinx are similar to MySQL FULLTEXT search, or for those even more confused, think Google (yeah, this is a bit of a stretch, I know).</p>
<h2>Similarities</h2>
<ul>
<li>Both Solr and Sphinx satisfy all of your requirements. They&#039;re fast and designed to index and search large bodies of data efficiently. </li>
<li>Both have a long list of high-traffic sites using them (<a href="http://wiki.apache.org/solr/PublicServers" rel="nofollow">Solr</a>, <a href="http://www.sphinxsearch.com/powered.html" rel="nofollow">Sphinx</a>) </li>
<li>Both offer commercial support. (<a href="http://www.lucidimagination.com/" rel="nofollow">Solr</a>, <a href="http://www.sphinxsearch.com/consulting.html" rel="nofollow">Sphinx</a>) </li>
<li>Both offer client API bindings for several platforms/languages (<a href="http://www.sphinxsearch.com/contribs.html" rel="nofollow">Sphinx</a>, <a href="http://wiki.apache.org/solr/#head-ab1768efa59b26cbd30f1acd03b633f1d110ed47" rel="nofollow">Solr</a>) </li>
<li>Both can be distributed to increase speed and capacity (<a href="http://www.sphinxsearch.com/docs/current.html#distributed" rel="nofollow">Sphinx</a>, <a href="http://wiki.apache.org/solr/DistributedSearch" rel="nofollow">Solr</a>) </li>
</ul>
<h2>Here are some differences</h2>
<ul>
<li>Solr, being an Apache project, is obviously is Apache2-licensed. <a href="http://www.sphinxsearch.com/licensing.html" rel="nofollow">Sphinx is GPLv2</a>. This means that if you ever need to embed or extend (not just &quot;use&quot;) Sphinx in a commercial application, you&#039;ll have to buy a commercial license. </li>
<li>Solr is <a href="http://wiki.apache.org/solr/Solrj#head-02003c15f194db1a691f8b9bb909145a60ccf498" rel="nofollow">easily embeddable</a> in Java applications. </li>
<li>Solr is built on top of Lucene, which is a proven technology over <a href="http://svn.apache.org/viewvc/lucene/java/tags/LUCENE_1_0_1/" rel="nofollow">7 years old</a> with a <a href="http://wiki.apache.org/lucene-java/PoweredBy" rel="nofollow">huge user base</a> (this is only a small part). Whenever Lucene gets a new feature or speedup, Solr gets it too. Many of the devs committing to Solr are also Lucene committers. </li>
<li>Sphinx integrates more tightly with RDBMSs, especially MySQL. </li>
<li>Solr can be <a href="http://highscalability.com/how-rackspace-now-uses-mapreduce-and-hadoop-query-terabytes-data" rel="nofollow">integrated with Hadoop to build distributed applications</a></li>
<li>Solr can be <a href="http://stackoverflow.com/questions/211411/using-nutch-crawler-with-solr" rel="nofollow">integrated with Nutch to quickly build a fully-fledged web search engine with crawler</a>. </li>
<li>Solr can <a href="http://wiki.apache.org/solr/ExtractingRequestHandler" rel="nofollow">index proprietary formats like Microsoft Word, PDF, etc</a>. Sphinx <a href="http://stackoverflow.com/questions/1207995/indexing-word-documents-and-pdfs-with-sphinx" rel="nofollow">can&#039;t</a>. </li>
<li>Solr comes with a <a href="http://wiki.apache.org/solr/SpellCheckComponent" rel="nofollow">spell-checker out of the box</a>. </li>
<li>Solr comes with <a href="http://wiki.apache.org/solr/SolrFacetingOverview" rel="nofollow">facet support out of the box</a>. Faceting in Sphinx <a href="http://api-meal.eu/memo/128-faceted-search-with-sphinx-and-php/" rel="nofollow">takes more work</a>. </li>
<li><a href="http://stackoverflow.com/questions/737275/pros-cons-of-full-text-search-engine-lucene-sphinx-postgresql-full-text-searc/737931#737931" rel="nofollow">Sphinx doesn&#039;t allow partial index updates for field data</a>. </li>
<li>In Sphinx, <a href="http://www.sphinxsearch.com/docs/current.html#data-restrictions" rel="nofollow">all document ids must be unique unsigned non-zero integer numbers</a>. Solr <a href="http://wiki.apache.org/solr/UniqueKey" rel="nofollow">doesn&#039;t even require a unique key for many operations</a>, and unique keys can be either integers or strings. </li>
<li>Solr supports <a href="http://wiki.apache.org/solr/FieldCollapsing">field collapsing</a> to avoid duplicating similar results. Sphinx doesn&#039;t seem to provide any feature like this. </li>
</ul>
<h2>Related questions</h2>
<ul>
<li><a href="http://stackoverflow.com/questions/1284083/choosing-a-stand-alone-full-text-search-server-sphinx-or-solr" title="http://stackoverflow.com/questions/1284083/choosing-a-stand-alone-full-text-search-server-sphinx-or-solr" rel="nofollow">http://stackoverflow.com/questions/1284083/choosing-a-stand-alone-full-text-search-server-sphinx-or-solr</a></li>
<li><a href="http://stackoverflow.com/questions/1132284/full-text-searching-with-rails" rel="nofollow">http://stackoverflow.com/questions/1132284/full-text-searching-with-rails</a></li>
<li><a href="http://stackoverflow.com/questions/737275/pros-cons-of-full-text-search-engine-lucene-sphinx-postgresql-full-text-searc" rel="nofollow">http://stackoverflow.com/questions/737275/pros-cons-of-full-text-search-engine-lucene-sphinx-postgresql-full-text-searc</a></li>
</ul>
<h2>Conclusion</h2>
<p>In my experience, Solr is very-very fast on the query side. It is also very powerful. The indexing side is very CPU and memory intensive and is an unfortunate side effect of having such a feature-rich, fast application. Nevertheless, I highly recommend Solr.</p>
<p>For disclaimer purposes, I have not had much experience with Sphinx and, again, all credit for this comparison goes to <a href="http://stackoverflow.com/users/21239/mausch" rel="nofollow">mausch</a>.</p>
<div>&nbsp;</div><div><ul><li><a href="http://twitter.com/home?status=RT+@ArtemR:+Comparison+Between+Solr+And+Sphinx+Search+Servers+(Solr+Vs+Sphinx+-+Fight!)+-+http://tinyurl.com/llqrhb" rel="nofollow" title="Tweet This!">Tweet This!</a></li><li><a href="http://del.icio.us/post?url=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;title=Comparison+Between+Solr+And+Sphinx+Search+Servers+(Solr+Vs+Sphinx+-+Fight!)" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li><a href="http://digg.com/submit?phase=2&amp;url=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;title=Comparison+Between+Solr+And+Sphinx+Search+Servers+(Solr+Vs+Sphinx+-+Fight!)" rel="nofollow" title="Digg this!">Digg this!</a></li><li><a href="http://reddit.com/submit?url=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;title=Comparison+Between+Solr+And+Sphinx+Search+Servers+(Solr+Vs+Sphinx+-+Fight!)" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a></li><li><a href="http://www.stumbleupon.com/submit?url=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;title=Comparison+Between+Solr+And+Sphinx+Search+Servers+(Solr+Vs+Sphinx+-+Fight!)" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li><a href="http://www.facebook.com/share.php?u=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;t=Comparison+Between+Solr+And+Sphinx+Search+Servers+(Solr+Vs+Sphinx+-+Fight!)" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li><a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;title=Comparison+Between+Solr+And+Sphinx+Search+Servers+(Solr+Vs+Sphinx+-+Fight!)&amp;summary=In%20the%20past%20few%20weeks%20I've%20been%20implementing%20advanced%20search%20at%20Plaxo,%20working%20quite%20closely%20with%20Solr%20enterprise%20search%20server.%20Today,%20I%20saw%20this%20relatively%20detailed%20comparison%20between%20Solr%20and%20its%20main%20competitor%20Sphinx%20(full%20credit%20goes%20to%20StackOverflow%20user%20mausch%20who%20had%20been%20using%20Solr%20for%20the&amp;source=beer%20planet" rel="nofollow" title="Share this on Linkedin">Share this on Linkedin</a></li><li><a href="http://beerpla.net" rel="nofollow" title=""></a></li></ul><div></div></div>Similar Posts:<ul><li><a href="http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/" rel="bookmark" title="June 21, 2009">Hidden Features Of Perl, PHP, Javascript, C, C++, C#, Java, Ruby, Python, And Others [Collection Of Incredibly Useful Lists]</a></li>

<li><a href="http://beerpla.net/2009/08/18/delicious-com-quietly-rolls-out-domain-and-url-searchingfiltering-finally/" rel="bookmark" title="August 18, 2009">Delicious.com [Quietly] Rolls Out Domain And Url Searching/Filtering. Finally!</a></li>

<li><a href="http://beerpla.net/2008/06/14/top-10-reasons-why-digsby-rocks-or-why-you-should-try-digsby-right-now/" rel="bookmark" title="June 14, 2008">Top 10 Reasons Why Digsby ROCKS</a></li>

<li><a href="http://beerpla.net/2008/04/13/my-mysql-conference-schedule/" rel="bookmark" title="April 13, 2008">My MySQL Conference Schedule</a></li>

<li><a href="http://beerpla.net/2009/03/18/mysql-indexing-considerations-of-implementing-a-priority-field-in-your-application/" rel="bookmark" title="March 18, 2009">MySQL Indexing Considerations Of Implementing A Priority Field In Your Application</a></li>
</ul><!-- Similar Posts took 22.268 ms --><a href="http://www.addtoany.com/share_save?linkurl=http://beerpla.net/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-fight/&amp;linkname=Comparison%20Between%20Solr%20And%20Sphinx%20Search%20Servers%20(Solr%20Vs%20Sphinx%20&amp;%238211;%20Fight!)"><img src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark" /></a><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=20918&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=20918&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/09/03/comparison-between-solr-and-sphinx-search-servers-solr-vs-sphinx-%e2%80%93-fight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

