Another log on the fire

Posted by Double Compile on Tuesday, April 22. 2008 in Databases

If you want foreign key support in MySQL, you need to use the InnoDB storage engine. If you want fulltext index support, you need to use the MyISAM storage engine. Ain't that a bitch?

Just for the record: PostgreSQL supports them both well.

To be fair, the syntax for fulltext searching in MySQL is more simple than that of fulltext searching in PostgreSQL. Here's an example:

MySQL:

SELECT title
FROM example
WHERE MATCH (title, body) AGAINST ('foobar')

PostgreSQL:

SELECT title
FROM example
WHERE to_tsvector(title || body) @@ to_tsquery('foobar');

So while the syntax is easier, you can't use fulltext and foreign keys simultaneously in MySQL. PostgreSQL wins this battle.


Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Pavatar, Gravatar, Identica, Twitter, Favatar, Identicon/Ycon author images supported.

Quicksearch

Search for an entry in /dev/weblog:

Did not find what you were looking for? Post a comment for an entry or contact us via email!

cronjob