Generate useful test data and random dates in MySql. All code and tables are provided.
10 Older Entries »
A short MySql function to generate a Lorum Ipsum text. You can download the code in the zip file below.
You can use this MySQL function to generate names, (e-mail)addresses, phone numbers, urls, bit values, colors, IP address, etc.. As usual, the code is provided in a zip and the code is fully documented.
Taxonomy of Database Tools
In the MySQL ecosphere there is an ecosystem of tools. Like real-world ecosystems, the “creatures” in the MySQL tools ecosystem can be classified and organized by a taxonomy. There are already multiple taxonomies of software bugs (e.g. A Taxonomy of Bugs), but as far as I know this is the first Taxonomy of Database Tools. A taxonomy of database tools serves useful purposes, as discussed in the previously linked page. For me, the most useful purpose is the high-level ecosystem view which I use to compare MySQL tools to …[Read more]
The easiest way to generate random rows in MySQL is to use the ORDER BY RAND() clause. SELECT col1 FROM tbl ORDER BY RAND() LIMIT 10; This can work fine for small tables. However, for big table, it will have a serious performance problem as in order to generate the list of random rows, MySQL […]
Some days ago I was working in a vocabulary game and dictionary. The dictionary contains 1,10,000 words and meanings. I developed a vocabulary game where I had to randomly choose 10 words out of 1,10,000 dataset. Here I’m describing the possible solutions for retrieving 10 random words from 1,10,000… Read Full Article
This is far from deeply technical but little things that should
be simple but aren’t annoy me. I found that MySQL
--prompt_body don’t “just work.” I wanted the prompt
mysql \v> . So I tried:
make_sandbox_from_source /mysql/src/mysql-4.0.30 single --prompt_body=' \v> '
sh: -c: line 0: syntax error near unexpected token `newline'
sh: -c: line 0: `make_sandbox /mysql/src/mysql-4.0.30/4.0.30 --prompt_body= \v> '
Maybe my shell knowledge is more terrible than I realize so I verified that ‘
\v> ‘ does not need special
echo ' \v> '
Ok, so clearly it’s the fault of
make_sandbox_from_source. I tried and tried to do
this on the command line but …
There’s very few spots left for attending OpenSQL Camp 2009. I’m going, along with several other Percona employees. It’s fun stuff; you should go. I’m not really the social type so I’ll probably be sitting off to the side somewhere coding.
My mind is playing "Suffering Succotash..."
I have been working on MySQL performance for a while now, and the team I am in have discovered that SysBench could do with a couple of tweaks for Solaris.
To simulate multiple users sending requests to a database, sysbench uses multiple threads. This leads to two issues we have identified with SysBench on Solaris, namely:
- The implementation of random() is explicitly identified as unsafe in multi-threaded applications on Solaris. My team has found this is a real issue, with occasional core-dumps happening to our …
10 Older Entries »