Showing entries 14691 to 14700 of 44917
« 10 Newer Entries | 10 Older Entries »
MySQL Quirk with Not Null Columns and Default Values

One of my coworkers came across a strange quirk in MySQL with default values for not null columns. Take a look at this table:

Create Table Posts
(
     PostID Int Auto_Increment Primary Key
    ,Title Varchar(30) Not Null
    ,Body Text Not Null
    ,Summary Varchar(25) Not Null Default ''
);

Note the column Summary that is marked not null but has a default value of an empty string. Now, try to insert a null value into this column.

Insert Into Posts (Title, Body, Summary) Values ('A title', 'A body', null);

You’ll get this error:

ERROR 1048 (23000): Column 'Summary' cannot be null

Now, using an extended insert (where you specify multiple rows in an insert statement), we can insert the same data and it will complete successfully, although there will be warnings.

Insert Into Posts (Title, Body, Summary) Values ('A title', 'A body', null), ('2nd body', '2nd body', null);

Query OK, 2 rows …
[Read more]
Hint of the day: noatime and relatime in fstab

It’s been written about everywhere, but since we keep spotting installations in the wild where people don’t know about it, it probably deserves another mention.

By default, Linux uses the atime option on a disk mount, which means it writes a timestamp (e.g. a write to the drive) every time it reads anything. So in this case, reads cause writes – and also disk seeks, because a read from a file will then trigger having to write to the directory that contains the file. This even occurs if a file is read from the file system’s page cache (reading from the machine’s memory rather than the drive).

Unless you require an audit trail of users reading files, you generally you don’t want this. Thus, you want to add the noatime option to the disk mount in /etc/fstab. If you have just the defaults in there, you just make it defaults,noatime. It’ll doesn’t necesarily require a reboot as you …

[Read more]
Problems with Open Source: Part 2

In my prior post on the problems with open source, I wrote that one issue that impacts open source revenues is the macro economy, and how a declining or difficult macro economy can result in reduction of revenues to open source companies. The following article talks about how financially troubled Spain is saving a "fortune" by moving to open source. The Spanish government's savings are coming at the expense of proprietary server software companies--most likely Microsoft--but I would be willing to bet that none of this "savings" is flowing to the open source vendors. That is what happens in a difficult macro economy.

Problems with Open Source: Part 2

In my prior post on the problems with open source, I wrote that one issue that impacts open source revenues is the macro economy, and how a declining or difficult macro economy can result in reduction of revenues to open source companies. The following article talks about how financially troubled Spain is saving a “fortune” by moving to open source. The Spanish government’s savings are coming at the expense of proprietary server software companies–most likely Microsoft–but I would be willing to bet that none of this “savings” is flowing to the open source vendors. That is what happens in a difficult macro economy.

The post Problems with Open …

[Read more]
(Slides) DIY – A distributed database cluster, or: MySQL Cluster

Ever wondered how a database cluster ticks? Here’s how! During my talk at the International PHP Conference (#ipc13) I tried to build a cluster. I brought a soldering iron, sold, pink, orange and brown cables with me. Then, I tried to sold the thick (reliable, high throughput) brown cable at my company notebook (video coming). Eventually, I failed. Probably, I lacked the theoretical background?! Luckily, I got very theoretical slides with me…

DIY: A distributed database cluster, or: MySQL Cluster from Ulf Wendel

[Read more]
OblakSoft Cloud Storage Engine Newsletter, June 2013

ClouSE 1.0b.1.8 is released

OblakSoft is pleased to announce the release of ClouSE Beta version 1.0b.1.8.  This is a minor maintenance release that addresses a couple pain points, while we’re working on a release candidate that will bring the built-in point-in-time recovery and other major features.

Here is the summary of changes:

  • Improved caching for Weblobs

Now ClouSE sets the cache control headers for Weblobs.  The cache control headers specify the max-age directive that allows caching content for one year.  This makes proxies and content delivery networks (CDN) more efficient.  The change resolves this support issue.

  • Improved error handling on startup

Now database requests fail if …

[Read more]
Five More Things Deadly to Scalability

Read the original article at Five More Things Deadly to Scalability

Join 6000 others and follow Sean Hull on twitter @hullsean. 1. Slow Disk I/O – RAID 5 – Multi-tenant EBS Disk is the grounding of all your servers, and the base of their performance. True with larger and larger main memory, much is available in cache, a server still needs to constantly read from disk [...]

For more articles like these go to Sean Hull's Scalable Startups

Related posts:

  1. Mobile Scalability – What is it and why is it important?
[Read more]
MySQL 5.6 - a picture is worth a thousand words!


I feel obligated to use the classic quote from  Arthur Brisbane "One look is worth a thousand words". I recently received the picture below and the question; "guess when we upgraded to MySQL 5.6"?



The graph is from MySQL Enterprise Monitor (more information about MySQL Enterprise Monitor can be found here) and  is showing the amount of rows accessed via using indexes verses full table scan. So all blue stuff is where MySQL is not using indexes for statements, this is of course always a bad thing.

At the 4th of June you see that almost all "Rows Read via Full Scan" went away, this was the point in time when customer upgraded to MySQL 5.6, …

[Read more]
MySQL on Cloud Storage: ClouSE upgrade made easy

Updating ClouSE can now be done with one command

With more than a thousand registered users worldwide, guiding customers through the upgrade process is getting hard, so we decided to automate the servicing steps.  Now the update-clouse script can be used to update ClouSE binaries to the current version.  This script ships with the ClouSE binary distribution.

Here is an example of updating ClouSE using the Webmin console.

First, download ClouSE 64-bit binaries from http://www.oblaksoft.com/downloads/.  Then upload and extract the binaries to the /home/ec2-user directory. In Webmin, navigate to Others, then to Upload and Download, then …

[Read more]
Using XtraBackup to backup a remote machine

I love Percona's XtraBackup utility.  It's basically a GPL answer to Oracle's proprietary (and expensive) MySQL Enterprise Backup.  Percona claims that it has even more features that Enterprise Backup.  I do not have access to Oracle's product, though, so I cannot evaluate that claim.

I have my backups set up in a particular way, for convenience and security.  I have a backup machine that has

Showing entries 14691 to 14700 of 44917
« 10 Newer Entries | 10 Older Entries »