Constraints are simultaneously one of my most favorite and least favorite Oracle Database features. They're great for keeping bad data out of the database. They're a terrible imposition on object-oriented, agile, or <insert your favorite buzzword here> coding style. They save a ton of repetitive coding, writing the same logic in different languages. Hey, we already wrote all that redundant code
Few months ago I’ve switched one of our internal projects from doing synchronous database saves of analytics data to an asynchronous processing using starling + a pool of workers. This was the day when I really understood the power of specialized queue servers. I was using database (mostly, MySQL) for this kind of tasks for years and sometimes (especially under a highly concurrent load) it worked not so fast… Few times I worked with some queue servers, but those were either some small tasks or I didn’t have a time to really get the idea, that specialized queue servers were created just to do these tasks quickly and efficiently.
All this time (few months now) I was using starling noticed really bad thing in how it works: if workers die (really die, or lock on something for a long time, or just start lagging) …
[Read more]Note that I’m talking about using these tools in some kind of professional way, and more specifically, I’m talking about using Excel as a database, and using VPS hosting to host “professional” web sites. By “professional”, I mean something other than your personal blog, picture gallery, or other relatively inconsequential site.
Excel is not a database
Here’s the thing: Excel isn’t a database. Most people who don’t work in IT don’t seem to understand this, and they’re deathly afraid to actually communicate with anyone in IT, so they take matters into their own hands, and create problems so big that IT is forced to get involved, because at some point this spreadsheet becomes “critical” to some business function. Then IT gets even more bitter toward the non-IT folk, validating some of the reasons the non-IT folk went that route in the first place, and virtually guaranteeing that they won’t come to the IT …
[Read more]The next MySQL University session will take place this Thursday, 30th October. Giuseppe Maxia will get you up to speed with using MySQL Sandbox for quick and easy testing of MySQL.
This session will start at 15:00 Central European Time (14:00 UTC, 14:00 BST).
MySQL University is an educational program run virtually on the
'net. Sessions are open to anyone. MySQL University focuses on
MySQL internals and on Sun technology that can be used in
connection with MySQL, but we're open to hear your suggestions
for other topics. Go to this page and fill in your suggestions!
…
[Read more]After a series of tests, we've just conducted the first MySQL University session using a new conferencing system, Dimdim, and I thought I'd let you know how it went.
MySQL University is an educational program for engineers from Sun/MySQL and the MySQL community, Dimdim is the new conferencing system that we hope will be able to replace our old presentation system, and "we" isn't plurale majestatis but rather refers to the guys running the MySQL University program, the Sun Database Group documentation team.
I started the Dimdim session fifteen minutes before the hour, and when the two presenters arrived we did a sound check. Petr and David connected from Sun offices in Prague, Czechia, and California, respectively, and I was on a DSL line in my home office in Berlin, Germany. Sound …
[Read more]I’ve been doing a little reporting project, and I’ve been searching around for quite some time for a good graphing and charting solution for general-purpose use. I had come across ReportLab before, but it just looked so huge and convoluted to me, given the simplicity of what I wanted at the time, that I moved on. This time was different.
This time I needed a lot of the capabilities of ReportLab. I needed to generate PDFs (this is not a web-based project), I needed to generate charts, and I wanted the reports I was generating to contain various types of text objects in addition to the charts and such.
I took the cliff-dive into the depths of the ReportLab documentation. I discovered three things:
- There is quite a lot of documentation
- ReportLab is quite a capable library
- The documentation actually defies the simplicity of the library.
It’s a decent bit easier than it …
[Read more]
What is the future of Drizzle? What sort of assumptions are you
making?
Hardware
On the hardware front I get a lot of distance saying "the future
is 64bit, multi-core, and runs on SSD". This is a pretty shallow
answer, and is pretty obvious to most everyone. It suits a sound
bite but it is not really that revolutionary of a thought. To me
the real question is "how do we use them".
64bit means you have to change the way you code. Memory is now
flat for the foreseeable future. Never focus on how to map around
32bit issues and always assume you have a large, flat, memory
space available. Spend zero time thinking about 32bit.
If you are thinking "multi-core" then think about it massively.
Right now adoption is at the 16 core point, which means that if
you are developing software today, you need to be thinking about
multiples of 16. I …
Update to tomorrow's MySQL University session: Petr will
start presenting how to use NetBeans for writing PHP. David will
continue showing how to use it with MySQL. To set expectations
correctly, we've renamed the MySQL University to Working with PHP and MySQL in NetBeans.
Petr Pisl from the NetBeans team will be David Van Couvering's
co-presenter for the MySQL University session this Thursday (see
the announcement I posted yesterday). While
David will focus on NetBeans with MySQL, Petr will demonstrate
what NetBeans can do for PHP programmers, a species that uses
MySQL all the time. Thanks for joining in, Petr!
So many engines, and so little to choose from. This is one of our
two major decision points in Drizzle right
now.
Let me explain.
Today we have Innodb, Maria, Falcon, and PBXT.
Simple?
Not really. Innodb is not a single engine, it is three engines.
We have the default one which is shipped. It has been the
wunderkinder for years now but has been showing its age. Go buy a
piece of hardware that has four cores and it quickly becomes
apparent that it is not aging well. There is the Innodb plugin,
and while it delivers on features, performance still …
So, I recently ran into one of those situations where a customer complains that his MySQL database is slow, and “it worked great until about two weeks ago”. The first thing I look at in these situations is not the queries or any code, but the indexes. Once I determined that the indexes were almost nonsensical, I had a look at the queries themselves, which proved that the indexes were, in fact, nonsensical. Running the queries as written in the code, from a mysql shell, with EXPLAIN, I was able to further confirm that the indexes (most of them, anyway) were never used.
Easy right? Just reindex the table!
NOTE: I’m going to skip the talk about all of the database design issues on this gig and just go straight to solving the immediate problem at hand. Just know that I had nothing to do with the design.
But, supposing this table has 15 million rows and is running on a machine with 2GB of RAM and only …
[Read more]