There is thorough documentation about the Partitioning feature in
MySQL 5.1. There are also nice articles like this one by Robin. However, I thought it would
be useful to have a quick "how-to" guide to partitioning by
dates. I'll use the world schema to keep it easy.
Partitioning a table by a range of dates is quite popular.
Unfortunately, the PARTITION BY RANGE only accepts an integer (or
a function that evaluates to an integer) as the partition
expression. That's fine if you want to partition by numeric types
like this:
ALTER TABLE City PARTITION BY RANGE(id) (
PARTITION p0 VALUES LESS THAN (1000),
PARTITION p1 VALUES LESS THAN (2000),
PARTITION p2 VALUES LESS THAN (3000),
PARTITION p3 …
MySQL continues to be a tipping point for the IT industry. In March of 2008 and January 2009 I talked about MySQL being a very important factor in the IT industry. Today, MySQL continues to play an important role in the direction of the IT industry. Some facts about MySQL in a down economy:While technical conferences are being canceled or running at 50% attendance of
Sign up today for OpenSQL Camp 2009! The space is confirmed so go ahead and make your travel arrangements. The event is free and will be taking place in Portland, OR on November 14-15th, 2009. If you are interested in leading a session or presenting a talk, be sure to add it to the session ideas page. Also, we are still looking for sponsors! Please visit the sponsors page if you or your company/organization might be interested. All donations are tax deductible.
We should have representatives from many open source database (and database-related) projects. PostgreSQL, MySQL, Drizzle, memcached, and Gearman, just to name …
[Read more]Reaction to EC’s Oracle-Sun delay. OIN to acquire ex-Microsoft patents. And more.
Follow 451 CAOS Links live @caostheory on Twitter and
Identi.ca
“Tracking the open source news wires, so you don’t have
to.”
Reaction to EC’s Oracle-Sun delay
Despite widespread criticism of the European Commission’s
decision to open a formal investigation into Oracle’s proposed
acquisition of Sun, Glyn Moody maintained that the EC deserves credit for
making open source a central part of its analysis. Meanwhile
Monty Program (by way of Steven J Vaughan Nicholls) explained why the EU
should block Oracle/Sun, Roberto Galoppini reported …
SSD disks seems to be the hot and cool new disk technology. And I
have to admit I don't understand why this is so hot. I think it's
useful alright, but really, putting an ancient block level
interface that dates back to the 1970's or so, to access a
persistent, random access and fast media just seems backwards to
me. Why? Because by doing this, we retain compatability with that
old block-level access of course, but we loose performance and we
loose random access.Properly used, flash based memory should
provide fast, persistent random-access memory, that is the
promise of the technology, right? Any many seems copncered with
what filesystem to use on SSD disks? Hey, com on, it's just like
RAM! Slower, yes, by persistent. I don't need blcok level access,
it doesn't help and the interfaces are inherently slow. And if
the underlying media is random access, why, for heavens sake
why?
Yes, I know there are a few issues to solve with Flash …
I don't know why or who was the first who introduced this legend, but if you review source code from time to time, you see one weird MYSQL SQL statement showing up regularly: SELECT LAST_INSERT_ID() FROM some table.
If you google for »SELECT LAST_INSERT_ID() FROM« you'll get 98,100 hits. And if you use Google Code you actually find all the public available sources using this phrase: 216 times in some PHP code, 120 times in Perl code, 102 times in Java code, 21 times in Python code, and finally 1 time in Ruby code.
But what's so bad about this statement? Let's go into the lab:
mysql> SELECT * FROM pages; +----+---------+-----------------------------------------+ | id | name | content | +----+---------+-----------------------------------------+ …[Read more]
While not a MySQL topic, as most of my readers view my MySQL Blog, my WordPress blog has been hacked? Has yours?
Like many, I’m sure you may have read about it like at Wordpress blogs under attack from hack attack but I was surprised when my custom permlinks did not work.
Being surprised I looked at Administrator accounts, and I found that there was one more number then being displayed in the list. I had to dig into the database to find the problem.
mysql> select * from wp_users where ID in (select user_id from wp_usermeta where meta_key = 'wp_capabilities' and meta_value like '%admin%'); +-----+-------------+------------------------------------+---------------+------------------------------+---------------------------+---------------------+---------------------+-------------+--------------+ | ID | user_login | user_pass | user_nicename | …[Read more]
I don't know why or who was the first who introduced this legend, but if you review source code from time to time, you see one weird MYSQL SQL statement showing up regularly: SELECT LAST_INSERT_ID() FROM some table.
If you google for »SELECT LAST_INSERT_ID() FROM« you'll get 98,100 hits. And if you use Google Code you actually find all the public available sources using this phrase: 216 times in some PHP code, 120 times in Perl code, 102 times in Java code, 21 times in Python code, and finally 1 time in Ruby code.
But what's so bad about this statement? Let's go into the lab:
mysql> SELECT \* FROM pages; +----+---------+-----------------------------------------+ | id | name | content | …[Read more]
I don't know why or who was the first who introduced this legend, but if you review source code from time to time, you see one weird MYSQL SQL statement showing up regularly: SELECT LAST_INSERT_ID() FROM some table.
If you google for »SELECT LAST_INSERT_ID() FROM« you'll get 98,100 hits. And if you use Google Code you actually find all the public available sources using this phrase: 216 times in some PHP code, 120 times in Perl code, 102 times in Java code, 21 times in Python code, and finally 1 time in Ruby code.
But what's so bad about this statement? Let's go into the lab:
mysql> SELECT \* FROM pages; +----+---------+-----------------------------------------+ | id | name | content | …[Read more]
We talked to Mark Matthews and Andy Bang, two core developers in the MySQL Enterprise Monitor team, to give us some insight into the new features in the latest MySQL Enterprise Release. You can find more about the MySQL Query Analyzer in our previous interview with Mark Matthews.