I actually wrote about this a bit in a comment on Paul's blog, but thought it time to re-hash
the issue since it came up again during a friendly discussion at
work (PostgreSQL was mentioned :)
Why doesn't MySQL have an custom field types? Or perhaps I should
call them complex field types, but either way, why no love for
anything but primitive strings and numbers?
Take an IP address, for instance. It is an unsigned 32-bit
integer. Yes, we can store it in its raw form and use the
INET_NTOA() and INET_ATON() functions. The problem seems to be,
however, that many people don't use those functions and opt to
use a varchar() instead. Ugly, wasteful, and, in some cases,
slow; but simple. The INET_* functions work well, and, while you
can mask this behind VIEWs and stored procedures, it seems to
make things more complex and …
It turns out that there is a bug that causes replication on a 5.1
slave to fail when reading LOAD DATA statements from a
4.1-or-earlier master.
About a month ago, I set up a data warehouse for an old 4.1.21
system that can't be upgraded. I decided to use the latest 5.1
beta to take advantage of partitioning, but within the first day
replication stopped rather suddenly and with a nondescript
error:
[ERROR] Error running query, slave SQL thread aborted.
Fix the problem, and restart the slave SQL thread with
"SLAVE START". We stopped at log 'xxx' position xxx
Using mysqlbinlog, I compared the relay log and the masters
binary log around that position, and noticed the relay log
appeared corrupt! I don't recall the exact steps I took, but I
isolated the problem to a LOAD DATA INFILE statement, and filed
my first issue with MySQL Enterprise support.
The great folks at MySQL Support had a …
With my continued investigation of evaluating alternative data management with cloud computing options, I’m now evaluating Amazon Simple DB. Still in restricted beta, it helps to have a friend on the inside.
Working through the Getting Started Guide (API Version 2007-11-07) was ok, annoying in parts. Here are some issues I found. I was working with Java as the programming language.
- The Docs enable you to view the language syntax in Java, C#, Perl, PHP, VB.NET, ScratchPad. You can also restrict the view to a specific language. A rather cool feature. One observation is there is no Python, which is rather ironic as my first investigation was …
I just posted slides from a talk I gave at a Facebook application developer conference in Las Vegas this weekend. The talk is titled Outrun the Lions. Our customers run several of the top 10 applications on Facebook right now (as measured by the number of active users), and I revealed the secrets to building applications that can handle the load.
The title is a pun on the story about lions and gazelles in Africa (every day, a gazelle wakes and knows it must outrun the fastest lion; every day a lion awakes and knows it must outrun the slowest gazelle). If you're a Facebook application developer, the lion is not your competition. It's your users. They will love you if you do a good job. They will love you so much that the load will destroy your application, and then they'll go away and they won't come back. (Another speaker at the …
[Read more]
I actually wrote about this a bit in a comment on Paul's blog, but thought it time to re-hash
the issue since it came up again during a friendly discussion at
work (PostgreSQL was mentioned :)
Why doesn't MySQL have an custom field types? Or perhaps I should
call them complex field types, but either way, why no love for
anything but primitive strings and numbers?
Take an IP address, for instance. It is an unsigned 32-bit
integer. Yes, we can store it in its raw form and use the
INET_NTOA() and INET_ATON() functions. The problem seems to be,
however, that many people don't use those functions and opt to
use a varchar() instead. Ugly, wasteful, and, in some cases,
slow; but simple. The INET_* functions work well, and, while you
can mask this behind VIEWs and stored procedures, it seems to
make things more complex and …
I have a somewhat strange relation to parser since a while. Like everyone I started with writing little parsers by hand and bounced several times against yacc and flex failing to get around their very own syntax.
Then I discovered lemon and used it in lighttpd for the configuration and HTTP parsing, finally a parser syntax I could read. But it still was a split between lexing and parsing.
Along the the way there was ragel with its wonderful dot-output to visualize its state-engine, very neat and a mixed lexer and parser.
2-3 weeks ago I finally stumbled over LPEG and I'm happily writing parsers now. Like a simple one that can parse complex SELECT queries and …
[Read more]
Mit einer der nächsten Versionen von XAMPP ist eine Überarbeitung
der Demo-Seiten geplant. Die sind nun auch schon 6 Jahre alt und
schreien förmlich nach einer Auffrischung.
Und damit wir uns nicht nur von unseren persönlichen Vorlieben
leiten lassen, suchen wir nun für eine Befragung zu deren
Usability freiwillige Teilnehmer.
Vielen Dank an alle Teilnehmer und ganz besonders an Karin
Kunkel, Sonja Uhl und Constanze Weiland, die diese Umfrage für
uns durchführen.
How do you version your database schemas?
There are quite a lot of different options. On some very small /
trivial applications developed by just one person, it might be
acceptable to use ad-hoc queries (maybe with a GUI) to manage the
schema - but this runs the risk of development and production
schemas becoming out of sync (or rather, out of sync with their
respective versions of code).
Requirements are typically
- Schema changes are held with the rest of the software in a
SCM system
- Schema changes can be made in one development environment and will be correctly propogated with code to other development and production environments as required
- Schema changes can be rolled back (if for example, a deployment contains a serious bug)
There doesn't seem to be an easy answer for this one.
Our teams do something like:
- …
On Windows® - but I guess it’s the same on another O.S. that does not support cluster - I noticed the following behavior when trying to execute a CREATE LOGFILE GROUP syntax like this:
CREATE
LOGFILE GROUP `test`
ADD UNDOFILE ‘test’
INITIAL_SIZE = 33M
UNDO_BUFFER_SIZE = 8M
ENGINE = NDBCLUSTER;
In v.5.1.25-rc, v.5.1.24-rc and v.5.1.23-rc, only SQL warnings are shown:
mysql> CREATE
-> LOGFILE GROUP `test`
-> ADD UNDOFILE ‘test’
-> INITIAL_SIZE = 33M
-> UNDO_BUFFER_SIZE = 8M
-> ENGINE = NDBCLUSTER;
Query OK, 0 rows affected, 2 warnings (0.01 sec)
mysql> SHOW WARNINGS;
…
I had a talk with a friend of mine, yesterday. He recommended to
me that I should move away from MySQL and become more proficient
with Oracle or MS SQL. The reason for this is that he argues that
there is a higher chance I can find a job working in a company
that uses a commercial databases (and also higher paid position)
then I could for a company that uses an open-source
database.
His logic was that:
If a company is already paying for a commercial database, they
would have no problem paying some more for someone to maintain it
or develop on it.
I started thinking about what he said to see if its true. Not so
long ago, I worked on a project for big car manufacturer in China
and they used Oracle databases. They had the resources to hire
quite a few PL/SQL developers for something relatively simple
(but I am pretty sure those PL/SQL developers are still working
on it as they get paid by the hour).
On the …