Showing entries 30291 to 30300 of 45392
« 10 Newer Entries | 10 Older Entries »
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.

what the fuck were they smoking

/*
Function to free dboptions hash element
*/

extern “C” void free_dbopt(void *dbopt);

void free_dbopt(void *dbopt)
{
free((unsigned char*) dbopt);
}

Memcached and MySQL.com

Seems like more secrets are being let out of the bag. MySQL Enterprise provides support for Memcached - a distributed memory-based caching system, and I've been asked to present a webinar discussing how we've used memcached in the MySQL.com architecture.

Once again it may come as a surprise that the MySQL.com websites have been using memcached well before MySQL started providing support. We were starting to have growing pains, with now 20 million page impressions and 3 million visitors per month, and needed to figure out how to effectively scale without throwing heaps of hardware at the problem. Memcached was a perfect solution and gives us a toolkit that is easily integrated into our …

[Read more]
Implementing Sharding in the Database

Over the past few weeks (years really) there has been some discussion on sharding. Instead of discussing when sharding is required, as there are good discussions on this already, I want to discuss how I would like to have sharding implemented in the database.

I want the database to handle sharding automatically, and where it can't be automatic, I want the database to help as much as it can.  Just like I want my business logic in a language ideally suited to it, and not stored procs (generally, there are always exceptions); I want all my physical persistence to be handled by the place that already does most of it, the database.  Having the database handle some of the physical persistence and the object relational layer handle the sharding logic isn’t ideal to me, and not just because the current object relational layers don’t have all the sharding functionality I want.  So here is what I want my database to do.   …

[Read more]
Brief rambling about locales in RDBMS

Ok, here is something I wish I could travel back in time and shoot who ever decided it would be smart to make RDBMS locale dependent. As in crap like different decimal separators or worse yet date formats. If at all leave this work to the client, but better yet leave it to the frontend. Today I went through a bit of work until I finally figured out that in order to have SQL Server understand an ISO date (running against a DB configured as German), I needed to set the dateformat in the connection session with a query like "SET DATEFORMAT ymd". You might be wondering about the fact that "ymd" doesn't look very ISO date, but all it actually tells SQL Server is that the numbers between the separators are to denote year first, month second and day third. What really ticks me off though is that I once again forgot to look at the number one source for making RDBMS …

[Read more]
5 Days of Sun and MySQL

So it's been a year since we were all sitting thunderstruck in the ballroom of the Swan and Dolphin Hotel in Florida as Marten announced that we were being acquired by Sun Microsystems. To be honest, normally with these things people say it feels like "ages ago", in fact for me it feels like it just happened yesterday and it feels like we're only getting started.

One of the coolest things about Sun and the combination of Sun and MySQL is that Sun is a technology oriented company with some incredibly bright people who are there to come up with neat technology stuff during their waking hours. In some ways, that's very much like MySQL. After all, we build technologies that drive other technologies and business.

For the last year people have talked about how MySQL has been affected by Sun. But you know, influence is a two-way street. Former MySQL-ers (now called Sun Dolphins) are spread throughout the organization outside of …

[Read more]
Dolphins in the Sky

A cloudless night sky is truly amazing, but have you expected to see a dolphin in the sky?



What you see here is the Summer Triangle (all Southern hemisphere residents, please apologize), but did you notice the group of stars left to Altair?



This group of stars is the constellation named "Delphinus" (as can be guessed easily, it's the Latin word for Dolphin), which can be observed best at almost all latitudes around late spring and early summer (in fact it can be seen almost around the year, but that's the time of the year that you find this constellation highest in the sky).

So what is this all about? You may have heard that 2009 is the International Year of …

[Read more]
Showing entries 30291 to 30300 of 45392
« 10 Newer Entries | 10 Older Entries »