Community journal

The latest from the MySQL community

Ideas, releases, practical guides, and perspectives from the people building with MySQL.

Follow the feed
Showing entries 32041 to 32050 of 45503 « Previous | Next »
Stats In MySQL Pt. III: Alphabetical Distribution

Not as snazzy-looking as my last two, but a useful query nonetheless. One the applications we built over the years, among other things, takes a list of names and addresses (currently a little over 2600), and selects around 200 of them at random. The client has been keeping track of the alphabetical distribution of last names with each random batch, and was concerned that the apparent weighting of the list toward the beginning of the alphabet was evidence that the lists were not truly random.Fortunately I was able to get a quick statistical breakdown of the overall list, using the following: ...

DBD::mysql on OS X Quirks: Architectures, MySQL Binaries and the Filesystem

Yesterday evening, a friend of mine had some issues with installing DBD::mysql, and asked if I had encountered the same issue. The problem, as the output from make test showed, was that certain symbols was missing:

#     Tried to use 'DBD::mysql'.
#     Error:  Can't load '/Users/westerlund/src/perl/DBD-mysql-4.008/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/westerlund/src/perl/DBD-mysql-4.008/blib/arch/auto/DBD/mysql/mysql.bundle, 2): Symbol not found: _is_prefix

Fair enough, this is related to a 64-bit issue with MySQL—at least with my Perl version, which is now:

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=darwin, osvers=9.5.0, archname=darwin-thread-multi-64int-2level

If you try to link to a x86_64 version of MySQL, then you get the above mentioned error. So, I downloaded an x86 version of MySQL and tried again. The …

[Read more]
Information_Schema.Partitions – table_rows

I’m in the process of converting some very large data tables to partitioned tables. By “In the process” I mean “scripts are running as we speak and I’m monitoring what’s going on.” When I did this in our test environment (2 or 3 times to be sure), I got familiar with the information_schema.partitions table. There […]

MySQL Reference Manual Search

Martin Brown’s blog shows a pretty good way of navigating the MySQL Reference Manual. It’s worth noting, however, that finding the different topics has been a lot easier since mysql.com started using a Google appliance for its search.

I use the documentation all the time and have been doing so for years (I won’t claim that I can remember +2000 pages worth of ever-changing content). A few years back, I stopped using the search box on dev.mysql.com because the result sets were enormous, with lots of unrelated references. My technique was to do a Google site search:

For replication use the expression: replication site:http://dev.mysql.com/doc/refman/5.0/en/index.html

The …

[Read more]
Nice MySQL Workbench Tutorial - Creating A MySQL Forum Database

For everybody interested, please check out this very descriptive tutorial written by Adrian ‘yEnS’ Mato Gondelle. It shows how to create a database schema design with MySQL Workbench.

If you have written your own tutorials or blog posts about MySQL Workbench please drop us an email and we might feature it on our blog.

Optimizer Edge cases

I love teaching EXPLAIN in training classes with the world.sql sample database. One of my favorite edge cases to try and explain to students is:

SELECT Name FROM Country WHERE continent = 'Asia' AND population > 1 000 000 000;



If you add an index on Continent,Population and Population, MyISAM will choose to use the composite index (Continent,Population), whereas InnoDB will choose just the Population index.

It's a simple geography question... all of the countries in the world with > 1B people *are* in Asia. Since both indexes are equally effective, InnoDB chooses to use the one with the shorter key_len, despite the fact it will have to do a second stage check on the data rows to verify this.

I think that this decision (shorter index) is the right one - since unless the database has index pinning, it should …

[Read more]
Optimizer Edge cases

I love teaching EXPLAIN in training classes with the world.sql sample database. One of my favorite edge cases to try and explain to students is:

SELECT Name FROM Country WHERE continent = 'Asia' AND population > 1 000 000 000;



If you add an index on Continent,Population and Population, MyISAM will choose to use the composite index (Continent,Population), whereas InnoDB will choose just the Population index.

It's a simple geography question... all of the countries in the world with > 1B people *are* in Asia. Since both indexes are equally effective, InnoDB chooses to use the one with the shorter key_len, despite the fact it will have to do a second stage check on the data rows to verify this.

I think that this decision (shorter index) is the right one - since unless the database has index pinning, it should …

[Read more]
Take poll on backup futures

If you haven’t done so already, please take the new quickpoll that’s on the MySQL dev zone.  We’re gathering feedback on what features you’d like to see most after the first cut of the new MySQL backup is released in version 6.0.

If you haven’t kicked the tires of the new backup yet, you can download it here.  And if you want to see the new backup in action, you can check out the article I wrote on it here.

Thanks for your feedback!

foss.my open for participation


What started as some chat about having a one-day event, after MyGOSSCon, on the 26th of September 2008, about open source, has turned into a full-blown conference, to be pulled off in about a month, affectionately known as foss.my. Its being held at APIIT from November 8-9 2008, and is touted to be the most technical conference of its kind in South East Asia.

We want people to participate as speakers, delegates, sponsors, or volunteers. This is a grassroots event, and its purely non-commercial - no vendor talks, or marketing gimmicks are permitted. Largely the motto is very foss.in/linux.conf.au-ish - both community events I truly enjoy going to, and wouldn’t miss for the world.

The …

[Read more]
Prolificity

I woke up today at 4:45 am, which is a completely worthless time to be awake. I lay there for twenty minutes tracking post-REM phosphenes and thinking random thoughts. Here's one of them.

The Planet MySQL aggregator ranks blogs according to 'activity', or number of posts in the last month. I typically care little for such things because unnecessary attention attracts unwanted expectation. However, were one to care about such things, this method of ranking favors those who tend to post like this:
Sunday, October 5
I broke my pencil but that's ok because I have another pencil.

Monday, October 6
I like Drizzle.

Tuesday, October 7
I like, drizzle.

Wednesday, October 8
I believe I lost my shoes, Clyde. I think the dog got 'em.

Free idea: Rank blogs using a Prolificity factor that …

[Read more]