Showing entries 17303 to 17312 of 44125
« 10 Newer Entries | 10 Older Entries »
Speaking at Big Data in Stockholm

I will be spaking at the conference "Reality Check: Big Data" coming up on April 26 here in Stockholm. This is all about big data in in's different shapes, and the conference is run by Swedish Computer Society and is sponsored by IDG. Read more about it here: http://www.dfkompetens.se/konferenser/kurser/1112022/index.xml

If you are there and want to talk, just catch me there, I'll be there most of the day, and my talk is in the afternoon, at 15:15.

Cheers
/Karlsson

Announcing MariaDB 5.1.61 and 5.2.11

Update: MariaDB 5.1.62 and 5.2.12 have been released. They contain an important security fix.

We are pleased to announce the immediate availability of MariaDB 5.1.61 and MariaDB 5.2.11. Both of these stable (GA) releases incorporate MySQL 5.1.61 and several bug fixes.

Please see the What is MariaDB 5.1 page for an overview of MariaDB 5.1, and the What is MariaDB 5.2 page for an overview of MariaDB 5.2.

Sources, binaries, …

[Read more]
[PrestaShop] Carrier selection by postal code

To select the carrier / delivery method in PrestaShop by the postal code of the delivery address, create a file Address.php in /override/classes with this content:

<?php
class Address extends AddressCore
{
    protected static function getPostcodeByAddress($id_address) {
        $row = Db::getInstance()->getRow('
            SELECT `postcode`
            FROM '._DB_PREFIX_.'address a
            WHERE a.`id_address` = '.(int)($id_address));
        return $row['postcode'];
    }

    public static function getZoneById($id_address)
    {
        $postcode = self::getPostcodeByAddress($id_address);
        if (in_array($postcode, Array(1050)))
            return 1;
        elseif (in_array($postcode, Array(2000)))
            return 10;
        return 0;
    }
}

In this example, postal code 1050 is assigned to the carrier with ID 1 and postal code 2000 is assigned to carrier ID 10 (see the carrier list in …

[Read more]
Can COUNT(*) be used in MySQL on InnoDB tables?

COUNT() function returns a number of rows returned by a query. In a popular opinion COUNT(*) should not be used on InnoDB tables, but this is only half true.

If a query performs filtering on any column, there is no relevant difference in how COUNT(*) will be executed regardless of the storage engine. In any such case MySQL has to look for matching rows and then count them.

In the following queries COUNT(*) can be used without any negative impact on performance:

SELECT COUNT(*) FROM mytable WHERE id = 12345
SELECT COUNT(*) FROM mytable WHERE is_enabled = 1
SELECT COUNT(*) FROM mytable WHERE username LIKE 'a%' AND is_enabled = 1

The real difference is when no filter is specified in WHERE clause, i.e. when query counts all rows in a table. MyISAM maintains cached row count for each table, so it can always return the value …

[Read more]
Should RAID 5 be used in a MySQL server?

Usually the answer should be “no!”. RAID level 5 is hardly ever a good choice for any database storage. It comes with a very high overhead as each write turns into a sequence of four physical I/O operations, two reads and two writes, in order not only to update a data block, but also to re-calculate and update the corresponding checksum block. The resulting penalty is not just slower writes. The extra operations mean the storage I/O capacity is reduced too.

Another disadvantage of using RAID 5 could be its very poor performance when it works in degraded mode. In such configuration a disk failure means some data was actually lost, but RAID 5 can rebuild the missing pieces on-the-fly as requests arrive. But reconstructing blocks is nowhere near as efficient as just reading them from disk.

In most cases using alternative RAID levels is advised. Both RAID 1 and RAID 10 offer equal data redundancy and protection …

[Read more]
new nagios / icinga plugin check_juniper_srx_ipsec_tunnel.pl

At the weekend I completed a new nagios / icinga plugin. The check_juniper_srx_ipsec_tunnel.pl plugin checks via SNMP the IPSec VPN / Tunnel State for a given VPN Gateway on a Juniper SRX gateway.

Usage: ./check_juniper_srx_ipsec_tunnel.pl -H &lt;Juniper Hostname&gt; -g &lt;IPSec Tunnel Gateway&gt; -C &lt;SNMP Community&gt;

You will find the plugin on my projects page

Related Posts:

[Read more]
Progress on High Performance MySQL, 4th Edition

With the 3rd edition of High Performance MySQL finally complete, I’ve begun work on the 4th edition. As you know, technology moves much faster than printing presses, and a book is outdated very quickly, so this is a never-ending project. I’m also outlining the 5th edition in anticipation of starting it immediately afterwards.

I’m looking for your input on what I should cover in the new edition. Should I discuss MySQL’s intra-query parallelization across multiple CPU cores? Should I explore how cloud computing platforms enable higher performance at lower cost than dedicated hardware? Should I explain the bizarre bug in MySQL’s datetime type that causes it to skip the day after March 31st every year? What are your suggestions?

Further Reading:

[Read more]
Disproving the CAP Theorem

Since the famous conjecture by Eric Brewer and proof by Nancy Lynch et al., CAP has given the world countless learned discussions about distributed systems and many a well-funded start-up.  Yet who truly understands what CAP means?  Even a cursory survey of the blogosphere shows profound disagreement about the meaning of terms like CP, AP, and CA in real systems.  Those who disagree on CAP include some of the most illustrious personages of the database community.

We can therefore state with some confidence that CAP is confusing. Yet this observation itself raises deeper questions.  Is CAP merely confusing?  Or is it the case that as with other initially accepted but now doubtful ideas like the Copernican …

[Read more]
How to find MySQL configuration file?

A customer called me today asking for help with locating the configuration file used by one of their production MySQL instances. From the description I was given it appeared that their server had at least six different copies of my.cnf file in different locations on disk. And all were similar enough that each could actually be the one. All superfluous files were the result of a bit negligent system administration. So what turned to be the quickest and the least destructive way to find the correct one?

Initially suspecting the server was simply running more than just one MySQL instance, I logged in to take a deeper look. But I found only one mysqld process and, indeed, several configuration files.

All of them seemed good candidates:

/etc/my.cnf
/etc/mysql/my.cnf
/var/lib/mysql/my.cnf
...

In many cases you could simply check system process list using ps:

server ~ …
[Read more]
Progress on High Performance MySQL, 4th Edition

Note: This post was an April Fool’s Joke. I was not actually working on a 4th edition. As of 2016, there’s no project to create a 4th edition yet. With the 3rd edition of High Performance MySQL finally complete, I’ve begun work on the 4th edition. As you know, technology moves much faster than printing presses, and a book is outdated very quickly, so this is a never-ending project. I’m also outlining the 5th edition in anticipation of starting it immediately afterwards.

Showing entries 17303 to 17312 of 44125
« 10 Newer Entries | 10 Older Entries »