Showing entries 13563 to 13572 of 44047
« 10 Newer Entries | 10 Older Entries »
Keeping track of database table size changes in MySQL

I don’t know how common is this problem, but it is good to know from time to time about which tables how many storage space needed in certain time. For example, you can catch an amok running software part which writes your database full. Or, – as you will see soo – you can catch up some code what doesn’t work as excepted.

So, lets start at the beginning. You wanna to know how big are your tables, and you need to know how many data gets there day-by-day (or minute-by-minute. or whatever).

You can query information_schema.tables for table sizes, this is good, but you won’t be happy just with these results, because you won’t find any time based changes, so you have to store the data.

So first, we have to create a table to store this historical data:

CREATE TABLE `test`.`table_sizes` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE …
[Read more]
MySQL Notifier 1.1.4 has been released

The MySQL Windows Experience Team is proud to announce the release of MySQL Notifier version 1.1.4, the  latest addition to the MySQL Installer for Windows.

MySQL Notifier 1.1.4 introduces the following features:

  • Monitoring of services in remote Windows computers (any service, not only MySQL Server services, similar to the local services monitoring offered in MySQL Notifier 1.0.3) via asynchronous Windows Management Instrumentation. Monitored services are grouped by computer name where the topmost is the Localhost. After a service in the Localhost or a remote computer is added to the monitored list, the MySQL Notifier automatically monitors for MySQL Server services addition (this option can be turned-off by users).
  • Monitoring of MySQL Server instances on any platform via a timer configurable by users.  These instances are monitored via MySQL Workbench connections which are automatically …
[Read more]
MySQL Presentations to the Colombia Oracle Users Group

My slides for presentations on MySQL Backup and Recovery Essentials and Understanding and using MySQL in the Cloud from the Oracle Technology Network (OTN) event in Medellín‎ Colombia are now available.

Thank you to the Colombia Oracle Users Group for inviting me to the event.

Why Unique Indexes are Bad

Before creating a unique index in TokuMX or TokuDB, ask yourself, “does my application really depend on the database enforcing uniqueness of this key?” If the answer is ANYTHING other than yes, do not declare the index to be unique. Why? Because unique indexes may kill your write performance. In this post, I’ll explain why.

Unique indexes are a strange beast: they have no impact on standard databases that use B-Trees, such as MongoDB and MySQL, but may be horribly painful for databases that use write optimized data structures, like TokuMX’s Fractal Tree(R) indexes. How? …

[Read more]
Imagine CPUs will not get any faster
http://bit.ly/15fcYLt


I read an article recently, about how mobile apps will probably not get the hardware boost that people are expecting.

This is partially to do with that CPU performance hitting a sort of (heat) wall and cannot improve on their speed. As Linley Gwenapp said “we’ve been falling behind Moore’s Law ever since Intel hit the power wall back in 2005”.


I myself have noticed that on a few occasions when companies decided to buy an expensive machine for their main server, it turned out to perform slower on queries than their previous soon-to-be-updated machine.

In a …

[Read more]
Crash-resistant replication: How to avoid MySQL replication errors

Percona Server’s “crash-resistant replication” feature is useful in versions 5.1 through 5.5. However, in Percona Server 5.6 it’s replaced with Oracle MySQL 5.6′s “crash safe replication” feature, which has it’s own implementation (you can read more about it here).

A MySQL slave normally stores its position in files master.info and relay-log.info which are updated by slave IO_THREAD & slave SQL_THREAD respectively. The file master.info contains connection info & replication coordinates showing how many events were fetched from the master binary log. The relay-log.info, on the other hand, represents info showing the positions where the slave applied those events. You can read more about slave status logs …

[Read more]
Redo Logging in InnoDB

Introduction

InnoDB is a general-purpose storage engine that balances high reliability and high performance. It is a transactional storage engine and is fully ACID compliant, as would be expected from any relational database. The durability guarantee provided by InnoDB is made possible by the redo logs.

This article will provide an overview of the redo log subsystem or log subsystem of InnoDB. We will look at the following details:

  • The global log system object, which provides access to important data structures and information.
  • The mini-transaction (mtr), using which all redo log records are created.
  • The global in-memory log buffer (or just log buffer), into which the redo logs are written to from the mini transaction buffer. This log buffer will be periodically flushed to the log file on disk. …
[Read more]
Simple mysql backup script for windows

This is a very simple batch script for mysql backup on windows.

@echo off
 
REM "MySQL username"
SET muser="dba"
 
REM "MySQL password"
SET mpass="password"
 
REM "Source destination for mysqldump (executable)"
SET mbackup="C:\My Documents\mariadb-5.5.29-win32\bin"
 
REM "Backup destination for mysql"
SET mysqlbackup="C:\My Documents\backup\"
 
REM "Exclude database backup"
SET dbname="('information_schema','performance_schema')"
 
REM "Dump database to file"
for /f %%i in ('"%mbackup%\mysql -u%muser% -p%mpass% -e "select distinct table_schema from information_schema.tables where table_schema NOT IN %dbname%" --skip-column-name "') do (
    %mbackup%\mysqldump %%i -u%muser% -p%mpass% > %mysqlbackup%%%i.sql
)

It can be automated using scheduler in windows.

Tags: backup scriptwindowsCategory:  …

[Read more]
Site Blocked in Russia?

This is either too funny or too sad.

An acquaintance sent me this image from a cyber cafe or hotel in Russia. It says that my blog site is prohibited and violates Russian law, and that they’re blocking my site in accordance with the Russian Federal Law of 27.07.2006 No. 149-FZ.

All I can say is, “Wow!” I didn’t know that stuff about writing programs, web pages, and solving generic database and operating system problems was so sensitive. For that matter, I didn’t know what I post would interest any government. I half wonder whether my friend’s pulling my leg.

As I reflect on it, could it be that Oracle post on how to write an encrypted object type? or, how with proper OS credentials …

[Read more]
SQL Like Comparisons

SQL tidbits are always valuable and highly searched for by newbies (as opposed to reading the SQL documentation). Sometimes we seasoned SQL developers take for granted little things like when a single- or multiple-character wildcard comparison works. It seems we know what newbies don’t. That you need a wildcard comparison operator not simply and equality comparison operator.

The question posed to me was, “Why doesn’t my wildcard comparison work?” Here’s a simplified example of their question.

SELECT 'Valid' AS "Test"
FROM    dual
WHERE  'Treat' = 'Tre_t'
OR     'Treet' = 'Tre_t';

Naturally, the answer is that the equality operator compares the strings based on their exact match (character sensitively in Oracle and character insensitively in MySQL). It needs to be rewritten by replacing the equals (=) comparison operator with the LIKE

[Read more]
Showing entries 13563 to 13572 of 44047
« 10 Newer Entries | 10 Older Entries »