Showing entries 18471 to 18480 of 44113
« 10 Newer Entries | 10 Older Entries »
Handling SQL Errors in PDO

I love PHP's PDO (PHP Data Objects) extension; it gives a consistent, object-oriented interface to handling all kinds of relational database backends. One thing that annoys me is that the MySQL driver for PDO defaults to a silent error mode which can make SQL errors tricky to spot!

To give you an example, consider the query below (the correct tablename is country, so this SQL will fail):

$db = new PDO('mysql:host=localhost;dbname=sakila', 'user', 'pass');

$sql = 'select * from countrt';
$stmt = $db->query($sql);

while(($row = $stmt->fetch()) != false) {
    echo $row['country'] . "\n";
}

The script will output an error because $stmt is not an object.

You have a few options here - you can check that you got an object back before you try to do anything with it, for example. Alternatively you can prepare() and then …

[Read more]
DBA Life Made Easy: The SchoonerSQL™ Cluster Admin GUI

There may be some DBAs and database developers who love spending hour after hour writing scripts for failover, monitoring and alerts for their MySQL replication environment, not to mention maintaining these scripts. And even with the best scripts, failover and recovery usually require tedious error-prone manual intervention. This complexity makes life harder for DBAs, who have to spend too much of their time fighting fires instead of spinning up new applications.

If you're a DBA or a Developer, Schooner feels your pain. SchoonerSQL, our full high-availability build of MySQL and its standard InnoDB storage engine, includes a Cluster Admin GUI that radically simplifies cluster administration. The SchoonerSQL Cluster Admin GUI is a powerful centralized management tool that can monitor, manage, and backup your entire database servers inside the datacenter. Replication setup has never been so easy with just few clicks in our GUI.

[Read more]
MLC SSD card lifetime and write amplification

As MLC-based SSD cards are raising popularity, there is also a raising concern how long it can survive. As we know, a MLC NAND module can handle 5,000-10,000 erasing cycles, after which it gets unusable. And obviously the SSD card based on MLC NAND has a limited lifetime. There is a lot of misconceptions and misunderstanding on how long such card can last, so I want to show some calculation to shed a light on this question.

For base I will take Virident FlashMAX M1400 (1.4TB) card. Virident guarantees 15PB (PB as in petabytes) of writes on this card.
15PB sounds impressive, but how many years it corresponds to ? Of course it depends on your workload, and mainly how write intensive it is. But there are some facts that can help you to estimate.

On Linux you can look into the /proc/diskstats file, which shows something like:

 251       0 vgca0 30273954 0 968968610 …
[Read more]
VC funding for Hadoop and NoSQL tops $350m

451 Research has today published a report looking at the funding being invested in Apache Hadoop- and NoSQL database-related vendors. The full report is available to clients, but non-clients can find a snapshot of the report, along with a graphic representation of the recent up-tick in funding, over at our Too Much Information blog.

Setting per-server thresholds in MONyog.

Introduction:

If you have been using MONyog you will know that any metrics/counters may be identified with either of the ‘states’ STABLE, WARNING and CRITICAL. For those metric where it is relevant MONyog ships with settings for this that are (to the extend possible) commonly agreed ‘best practices’ by MySQL DBA’s. Metrics in a WARNING or CRITICAL state display with a (yellow or red) ‘marker’ indicating that this metric is not in a STABLE state. For metrics in a CRITICAL state further an alert can be sent (as a mail alert and/or a SNMP trap).

If the ‘best practices’ we have implemented in MONyog do not fit your environment or use case, it can easily be customized. Open the MONyog ‘Monitors/Advisor’ page, click on the name of the metric you want to adjust (it is a link). A small popup opens. As an example let us take the ‘Connection usage’ in the ‘Current connections’ group. In the popup …

[Read more]
MyQuery 3.4.3 GA Released

I have had MyQueru 3.4.2 as beta for quite a while now. During this time, a few minor bugs has appeared, and they have now been fixed. This means I can proudly announce MyQuery 3.4.3 as GA! Download it from Sourceforge!

Except a few bugfixes, the only major change is that the NDB Monitor plugin is no longer part of the prebuilt binaries. There are three reasons for this:

  • The plugin relies on NDB API, which still is still not available from Oracle in binary form, and if they insist on not shipping these binaries, although the source exists, I have to assume they do not want me to use them.
  • I just can't be bothered to build MySQL luster form source, just to get these binaries.
  • The way Windows binaries are built with NDB is not properly documented, so I had to guess and use some trial-and-errors. This was not something …
[Read more]
Some facts about MyISAM file handling and .MYI file In MySQL

Some facts about MyISAM File handling: • If a table is never updated, MySQL will never touch the table files, so it would never be marked as closed or corrupted. • If a table is marked readonly by the OS, it will only be opened in readonly mode. Any updates to it will fail. • When a normal [...]

Setting per-server threshold in MySQL Enterprise Monitor

I was speaking with a MySQL customer last week and he had a feature request for MEM. He wants different servers to have different threshold values for certain MEM advisor rules and suggests that users be allowed to override the thresholds when scheduling the rule against a server – just as you can with the refresh interval. At the moment they work around this by creating multiple duplicates of the same rule and then set different thresholds in each. This is a good feature request but in the mean-time this post explains an alternate workaround – having the rules act on thresholds that are defined within the databases of the individual serves.

Step 1. Create a new threshold table in each MySQL Server

The table should be created and then a row added for each rule that needs a per-server threshold:

mysql> create database clusterdb;use clusterdb;
mysql> CREATE TABLE thresholds (name VARCHAR(50) NOT NULL PRIMARY KEY, …
[Read more]
New England Database Summit

The New England Database Summit is an all day conference-style event where participants from the research community and industry in the New England area can come together to present ideas and discuss their research and experiences working with on data-related problems.  It is an academic conference with applications to real life, and includes any type of database.

The 5th annual NEDB will be held in Cambridge, MA MIT (in 32-123) on Friday, February 3, 2012.  Anyone who would like is welcome to present a poster (registration required), or submit a short paper for review.  We plan to accept 8--10 papers for presentation (15 minutes) at the meeting.   All posters will be accepted.

For more details, and to register and / or upload a paper, see:

http://db.csail.mit.edu/nedbday12/

Mongo criticism follow-up

My previous re-post on MongoDB was published on http://planet.mysql.com, and received some righteous criticism: anonymous bashing is never good. Well, I think I know why the post I quoted is anonymous: noone would enjoy admitting their own failure, and oh boy, to learn everything that the author of the post has learned one needed to fail big deal.

I just would like to repeat why I found this worth repositng: there is virtually no good data about when and how MongoDB is *not* applicable -- and the data provided by the Mongo team themselves (check this out for example http://www.mongodb.org/display/DOCS/How+does+concurrency+work) is very superficial.

I personally would be happy to erase this very link as soon as I get my hands on anything more accurate. NoSQL and Cloud is …

[Read more]
Showing entries 18471 to 18480 of 44113
« 10 Newer Entries | 10 Older Entries »