Showing entries 18673 to 18682 of 44742
« 10 Newer Entries | 10 Older Entries »
MongoDB for MySQL folks - Part 2

In this second part of a series of blogs on using a NoSQL database, in this case MongoDB, aimed at MySQL users, I will describe querying a bit. And it's probably not what you expected if you haven't tried a NoSQL database or MongoDB more specifically, before. The first blogpost on this subject is here.

At the heart of accessing MongoDB is JavaScript, more specifically it uses the Mozilla SpiderMonkey JavaScript engine. As I wrote in the previous blog on this subject, JavScript is all over the place in MongoB, largely you can look at MonngoDB as JavaScript with HUGE space for variables, and although many would look at this as gross oversimplification, it works as simple descripton of …

[Read more]
Ready to roll for Percona Live UK

All slides are done, all virtual images are completed and we’re ready to roll for tomorrow’s MySQL High Availability Sprint: Launch the Pacemaker tutorial at Percona Live UK 2011.

This is probably your very last chance to register for PLUK as there are only a handful of tickets left. You can still use my discount code, HaasPLUK11. See you tomorrow!

[FreeBSD] unicorn.god

I had a very strange problem concerning my Ruby on Rails installation, using FreeBSD, nginx, Unicorn and God.

When starting god from the command line as root, everything worked. However, as soon as I placed the god command into /etc/rc.local or a even service file in /usr/local/etc/rc.d, god didn’t start the Unicorn server but showed exit code 127 for “bundle exec unicorn -E production -c config/unicorn.rb”.

So I added a log directive to the god configuration and looked at the log file. It said:

env: ruby1.9: No such file or directory

Then I changed the god configuration to include /usr/local/bin in the PATH and now everything works. Here my configuration file:

RAILS_ROOT = '/srv/www/my-project-prod/current'

God.watch do |w|
    w.name = 'my-project'
    w.interval = 30.seconds

    w.uid = 'my-project'
    w.gid = 'my-project'

    w.pid_file = File.join(RAILS_ROOT, …
[Read more]
Speaking @ Percona Live in London Next Week!

A quick note, I am speaking at Percona live in London next week… its should be a rip roaring time. I have two topics I am speaking on.

The first is on building a MySQL Data Access Layer with Ruby and Sinatra. While this may seem a bit odd, its actually very cool and useful. With

jOOQ and Google Cloud SQL Example

This is all too simple. Here's how you can create an easy jOOQ / Google Cloud SQL integration example: Sign up with Google App Engine Sign up with Google Cloud SQL Create a Google App Engine project (preferably with Eclipse) Add jOOQ to your project Add your generated schema to your project Done Google Cloud … Continue reading jOOQ and Google Cloud SQL Example →

Log Buffer #242, A Carnival of the Vanities for DBAs

Whenever Oracle Open World ends, it not only leaves the technology professionals in awe and full of pride, it also makes them come up with new and great blogging ideras and this Log Buffer Edition covers that flowing notions from bloggers across the Oracle and MySQL beauties, in addition to SQL Server in Log Buffer [...]

UPDATE joins in MySQL

When you want to update rows that are stored in MySQL tables you use update statements. Usually the table you’re updating has to be defined and in case you want to update only certain rows a condition for the update operation has to be specified. If the condition can be expressed based on columns of the same table, you most probably do this by adding a WHERE-clause. But what if there are rows in tableA which you want to update based on a condition that depends on related rows from tableB? The answer? Drumroll please…: Use a join as you would do in SELECT statements!

Syntax

When you’re updating data in MySQL, you can specify a condition to specify which rows should be affected. The following update join example makes use of an inner join. However, you can use any other join operation MySQL supports, like an outer …

[Read more]
Using Perl, Cookies and MySQL to Record Web Site Visitor’s Data

I have built several web sites and applications in the past, and I have to admit that I am a data junkie. If there is user data or any other data to be captured when someone uses my application or visits a web page, then I like to capture it (I can always delete it later). Of course, you can use a third-party Javascript plug-in for web site analytics (which I also use), but I like to gather information myself.

Most of the pages that I have written use Perl – even for the home page when possible (yes, I am “old school”, and my lack of using modern Perl code is evident). Each time a user clicks to go to another page, I like to capture as much information as possible about their visit.

Perl, PHP and other scripting languages have ways for you to capture the information about your web page visitor. For Perl, this simple script will tell you a lot of information the visitor and your server. In order for this script to work, you …

[Read more]
MySQL Thread Pool: Limiting number of concurrent transactions

There are hot spots in the MySQL Server that become hotter when many
transactions are handled concurrently. This means that it is imperative
to avoid having too many concurrent transactions executing in parallel.

The thread pool handles this by prioritizing queued queries according
to whether they have already started executing a transaction or not.
It is also possible for the user to decide that a connection will be of
high priority independent of whether a transaction is started or not.

Such a prioritization can have issues with livelock if there are transactions
that are very long. To avoid this problem a query will be moved to the high
priority queue after a configurable time have expired. This time is set in the
configuration parameter --thread_pool_prio_kickup_timer
(number of milliseconds before a query is kicked up).

However to …

[Read more]
Find where your data is replicated, win a Percona Live ticket

Percona Live London starts on Monday, so this is the last in the series of free-Percona-Live tickets we’ll give away. But first — have you ever wondered what servers are in your MySQL replication hierarchy?

We have, too. As consultants, a lot of times we need to get a quick overview of the whole replication hierarchy and specific things about it, such as replication filters, versions, whether replication is running, how far behind it is, and so on. These things are very important for making sure that we don’t break something in the system, get blamed for breaking replication when it was already broken, and so on.

So we built pt-slave-find (it was actually born as mk-slave-find, ages ago before I even worked at Percona). It automatically detects and connects to …

[Read more]
Showing entries 18673 to 18682 of 44742
« 10 Newer Entries | 10 Older Entries »