Showing entries 11 to 20 of 38
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: Random (reset)
MySQL Random Data Selection

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

Setting the MySQL Sandbox prompt

This is far from deeply technical but little things that should be simple but aren’t annoy me. I found that MySQL Sandbox --prompt_prefix and --prompt_body don’t “just work.” I wanted the prompt to be 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 escaping:

echo ' \v> '
\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 …

[Read more]
OpenSQL Camp 2009 in Portland, Oregon

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.

Scalability and Stability for SysBench on Solaris

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.

Sidebar - sysbench is a simple "OLTP" benchmark which can test multiple databases, including MySQL. Find out all about it here , but go to the download page to get the latest version.

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 …
[Read more]
Scalability and Stability for SysBench on Solaris

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.

Sidebar - sysbench is a simple "OLTP" benchmark which can test multiple databases, including MySQL. Find out all about it here , but go to the download page to get the latest version.

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 …
[Read more]
Scalability and Stability for SysBench on Solaris

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.

Sidebar - sysbench is a simple "OLTP" benchmark which can test multiple databases, including MySQL. Find out all about it here , but go to the download page to get the latest version.

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 …
[Read more]
MySQL University: Random Query Generator

This Thursday (December 11th), Philip Stoev will talk about the Random Query Generator, a new QA tool that generates pseudo-random queries targeted to exercise a specific part of the server being tested. It then executes those queries to check for crashes or assertions or to compare the results returned from two different servers (two versions, two different storage engines, optimizer flags, etc.). It is also able to execute queries against a replication master, constantly checking that the slave is okay and has not diverged.

Towards the end of the session, Philip will share his desktop and show some live examples. Make sure to adjust your volume in case the MySQL Server will utter agonized sounds.

Note that we'll be using a new session address / Dimdim URL:

[Read more]
MySQL University for up to 100 attendees

Yesterday (December 4th), Sergey Petrunia gave a presentation on what's new in MySQL Optimizer. Unfortunately, the slides didn't show up in the Dimdim presentation area, which also means that the recorded session only has Sergey's voice but not the slides. (I've filed a bug in Dimdim's issue tracker.) However, Sergey kept referring to slide numbers in his talk, so it should be fairly easy (just not as convenient as usual) to follow his recorded presentation.

The slides, together with links to the recording and the chat transcript, can be found on the MySQL University session page.

Next week …

[Read more]
Two Tech Jobs: Technology Evangelist and Network Operations

I've been getting lots of inquiries from recruiters recently looking to find good people for various tech companies. Two in particular might be interesting if you're in the market or know someone who is.

Technology Evangelist at New York City Based Startup

If you saw Fred Wilson's post Are You A Connector?, you know a bit about this job already. It's a NYC based startup developing a new platform in an area that's likely to see serious growth in the next few years.

They're looking for someone with coding experience who loves showing other developers and users how stuff works: on stage, via blogs, in screencasts, and so on. It's important that this person have a technical (programming) background and also be very comfortable getting in front of people to demo and speak.

The company is New York based and this job is too. However, …

[Read more]
Random Timestamps in MySQL

Have you ever needed a random timestamp in MySQL? For example to create demo data programmatically? Here’s my solution:

SELECT FROM_UNIXTIME(
  FLOOR(
    UNIX_TIMESTAMP('2007-01-01') +
        RAND() *
        (UNIX_TIMESTAMP('2007-01-03')-UNIX_TIMESTAMP('2007-01-01'))
    )
) as random_timestamp;

Or if you prefer a function:

CREATE FUNCTION random_timestamp (start TIMESTAMP, end TIMESTAMP)
RETURNS TIMESTAMP NOT DETERMINISTIC
RETURN FROM_UNIXTIME(
  FLOOR(
    UNIX_TIMESTAMP(start) +
    RAND() *
    (UNIX_TIMESTAMP(end)-UNIX_TIMESTAMP(start))
  )
);

mysql> select random_timestamp('2007-10-01', NOW());
+---------------------------------------+
| random_timestamp('2007-10-01', NOW()) |
+---------------------------------------+
| 2007-10-05 23:07:11                   |
+---------------------------------------+
1 row in set (0.00 sec)
Showing entries 11 to 20 of 38
« 10 Newer Entries | 10 Older Entries »