Showing entries 29136 to 29145 of 44070
« 10 Newer Entries | 10 Older Entries »
Seven Semi-Useless Facts

   

My good friend and open source-loving, running, beer-drinking community ambassador and MySQL VP Kaj Arnö (top row middle) has named me (bottom left) in the "7 useless facts" meme.  I don't mind.  I'd mentally prepared myself for this semi-fun semi-useless task when I saw Jay Pipes do this a few weeks ago.  I figured Kaj would fall soon and he would spread the virus, er fun, to me. 

Here are the rules:

  • Link your …
[Read more]
Encrypting Replicated Data

Open source projects have a great way of pulling in original ideas. Take encrypting replicated SQL: it's a big deal when you are are not sure about network security. This problem comes up very quickly when you transmit data over WAN links or in shared/cloud environments.

I have been procrastinating on implementation of encryption in the Tungsten Replicator because it felt as if we were going to have to do some surgery for it to work correctly. (Another hypothesis is that I'm lazy.) However, this morning I was talking via Skype to Mark Stenbäck, an engineer from Finland whom we met through a recent conference. Mark had a great idea. Why not just write an event filter? An excellent thought...Here's how it could work.

Filters …

[Read more]
Allan Packer on performance tuning: Scaling MySQL

A year ago this past week (on January 16, 2008), Sun Microsystems announced a historic deal to acquire MySQL AB for a billion dollars. Since then, MySQL-ers (aka Sun Dolphins) have settled in with Sun folks. While Sun has had an influence on MySQL, MySQL has also had an influence on several projects within "Sun Classic". Over this week, we hope to explore some of the projects around Sun which use MySQL and how the acquisition has helped bring us all closer together.

Today we talk to Allan Packer, Principal Engineer in the Performance Technologies group at Sun Microsystems and team lead for the MySQL Performance & Scalability Project.

Some partition movement tricks with MySQL 5.1

I have been using partitioning in MySQL 5.1 since it has been in late beta, and with the odd bump I’ve been quite satisfied with its stability and ease of use. Perhaps the days of maintaining nasty application logic to maintain tables like table_yyyymm manually are finally over!

While some control freaks out there might still prefer the painful approach of manually keeping dated tables and using merge tables/views to link them together, you still have a lot of flexibility in how you manage individual partitions with the ALTER TABLE REORGANIZE/CHANGE/ADD PARTITION commands.

One trick i’ve discovered to work pretty well, is that you can swap in and out partitions right out from under MySQL’s nose. This can be useful in some situations.

WARNING!! This is not supported by MySQL to the best of my knowledge, and possibly is a risky, bad idea. Proceed only if you think you know what you’re doing!

[Read more]
Beware: ext3 and sync-binlog do not play well together

One of our customers reported strange problem with MySQL having extremely poor performance when sync-binlog=1 is enabled, even though the system with RAID and BBU were expected to have much better performance.

The problem could be repeated with SysBench as follows:

PLAIN TEXT CODE:

  1. ./sysbench --num-threads=2 --test=oltp --oltp-test-mode=complex --oltp-table-size=100000 --oltp-distinct-ranges=0 --oltp-order-ranges=0 --oltp-sum-ranges=0 --oltp-simple-ranges=0 --oltp-point-selects=0 --oltp-range-size=0 --mysql-table-engine=innodb  --mysql-user=root --max-requests=0 --max-time=60 --mysql-db=test run

On Dell R900 with CentOS 5.2 and ext3 filesystem we get 1060 transactions/sec with single thread and sync_binlog=1 while with 2 threads …

[Read more]
Demonstrating the Features of MySQL Native Driver for PHP, mysqlnd

Support for Persistent Connections

ext/mysqli does not support persistent connections when built with libmysql. However ext/mysqli does support persistent connections when built with mysqlnd. To establish a persistent connection with the MySQL server using ext/mysqli and mysqlnd, prepend the database host with the string "p:" (p stands for persistent) as shown below.


$host="p:localhost";
$port=3306;
$socket="/tmp/mysql.sock";
$user="root";
$password="admin";
$dbname="test";

$cxn = new mysqli($host, $user, $password, $dbname, $port, $socket)
        or die ('Could not connect to the database server' . mysqli_connect_error());

ext/mysql, ext/mysqli and PDO_MySQL support persistent connections when built with mysqlnd.

The new API call mysqli_fetch_all()

mysqlnd extends the ext/mysqli API with one brand new method, …

[Read more]
Demonstrating the Features of MySQL Native Driver for PHP, mysqlnd

Support for Persistent Connections

ext/mysqli does not support persistent connections when built with libmysql. However ext/mysqli does support persistent connections when built with mysqlnd. To establish a persistent connection with the MySQL server using ext/mysqli and mysqlnd, prepend the database host with the string "p:" (p stands for persistent) as shown below.


$host="p:localhost";
$port=3306;
$socket="/tmp/mysql.sock";
$user="root";
$password="admin";
$dbname="test";

$cxn = new mysqli($host, $user, $password, $dbname, $port, $socket)
        or die ('Could not connect to the database server' . mysqli_connect_error());

ext/mysql, ext/mysqli and PDO_MySQL support persistent connections when built with mysqlnd.

The new API call mysqli_fetch_all()

mysqlnd extends the ext/mysqli API with one brand new method, …

[Read more]
PostgreSQL adds windowing functions and common table expressions

As Hubert writes, PostgreSQL 8.4 has windowing functions.

Well done. I’ve been watching progress on this for a while. It greatly enhances the expressiveness of SQL.

What about common table expressions (WITH and WITH RECURSIVE)? Yes, PostgreSQL 8.4 will have common table expressions (WITH and WITH RECURSIVE) as well. That’s the “other” quantum [...]

Adding a value to enum Column - A Dirty Hack

It is the first time I am going to write something serious after registering this domain. Probably I was too lazy to blog or I was working hard that I had no time to write blogs.

Any way I have decided to break the silence

Today I came across a problem where I had to add a new value to an enum column in a table with a few million rows. The traditional method of getting that done will take ages to finish and I could not afford to have a such a long window. Fortunately for me I was dealing with a MyISAM table and I had a dirty trick in mind ]:< .

I will list out a small example showing how I did it:

Suppose my table is

create table a( id int,
choice enum('agree','disagree')
)Engine=MyISAM

and I want add a new choice ‘ Don’t care’ what I will do is , I will create a new table …

[Read more]
Allan Packer on performance tuning: Scaling MySQL

A year ago this past week (on January 16, 2008), Sun Microsystems announced a historic deal to acquire MySQL AB for a billion dollars. Since then, MySQL-ers (aka Sun Dolphins) have settled in with Sun folks. While Sun has had an influence on MySQL, MySQL has also had an influence on several projects within "Sun Classic". Over this week, we hope to explore some of the projects around Sun which use MySQL and how the acquisition has helped bring us all closer together.

Today we talk to Allan Packer, Principal Engineer in the Performance Technologies group at Sun Microsystems and team lead for the MySQL Performance & Scalability Project.

Showing entries 29136 to 29145 of 44070
« 10 Newer Entries | 10 Older Entries »