Data warehouse in MySQL

New challange – data warehouse for the purpose of specific customer (not sales aggregation). Before I started to read know how about data warehouse I prepared my own plan. The result of basic structure was almost fantastic, I only had to borrow the names for the elements from official sources. The type of data warehouse […]

Read more...

Synchronization of slaves in MySQL replication

When I started to use replication (on few tables) I encountered some problems with discrepancy on slave – it was mainly due to filters on slaves. I had to change some queries and everything was almost fine. Soon, I expanded my topology and started to replicate all databases from master. Simultenously, I read in the book “High […]

Read more...

My Sphinx Search replication (master and slaves)

One instance and one storage with indices is neither secure nor effective.  That is why I created my replication for Sphinx Search . To put it shortly, my Sphinx’s architecture constists of tree indices and MVA (multivalue attributes stored in mva_updates_pool) – that is why I cannot use RT index. My first idea was to create independent Sphix index + […]

Read more...

Programming bit index support

It seems to me that sometimes using hash tables is not required and thus no need to make another expensive JOINs. Especially, when the number of attributes can be foreseen, you can simply set some bit to on. Imagine, we have a product which has two attributes: new, promotion. Usually, we create 2 tables, `Product` […]

Read more...

MySQL PL/SQL Errors / Exceptions support

Functions like mysql_error() in PHP or try/catch blocks and MySqlException in C# are very helpful to discover problems. Unfortunately, inside stored procedure (routine) there is no ready component to catch errors to see what would return SHOW ERRORS. But I have wanted such feature at my EVENT (Event Scheduler)! Hopefully, I realized that I can […]

Read more...

Too many connections on MySQL

New problem on MySQL, called “tmc” – “Too Many Connections”. In case of environment with many db users, different applications/services and load balancing the investigation is not simple. First of all I have to clarify some question: there are two types of such event. Error: 1040 SQLSTATE: 08004 (ER_CON_COUNT_ERROR) – this concerns global connections. Error: […]

Read more...

Mailing list with pure Postfix+MySQL

How to create a mailing list on the base of Postfix? My main goal was to avoid installing Mailman and enable sending bulk emails. With Postfix VDA it was quite simple. My solution is in some way tricky but secure (SMTP Auth) and simple provided that user has been advised adequatly. From user’s standpoint one […]

Read more...

Hotcopy | Hackcopy Firebird

New problem within the Firebird RDBMS was how to get copy of consice data and not restarting server? I needed to make such backup once a two hours and send it to backup server. In order to do this I used internal “replication” of Firebird called “shadowing“. Creating of shadow copy is the process of […]

Read more...

Downgrade firebird from 2.x into 1.5.x

Uniquely, downgrade is required. That happened in my production environment. In generally, there is no official tools supporting such operation however I found on some forum solution which I successfuly tested. The clue is to make backup with tool gbak derived from version you wish to downgrade (in my situation it is 1.5.6). First of […]

Read more...

Firebird 1.5.x. Blackbox.

How to trace Firebird on Linux to discover what queries / procedures are executed, which machines are connected to and more with strace and tcpdump.

Read more...