June 19, 2013

Post: Virident vCache vs. FlashCache: Part 1

… a kernel module and set of utilities designed to provide functionality similar to that of FlashCache. In particular, Virident engaged Percona… after which dirty blocks will be written to the backing store, whereas FlashCache has a setting called “fallow_delay”, defined in…

Post: UDF -vs- MySQL Stored Function

… did not have a function to do the thing so I thought I’ll write MySQL Stored Function and we’ll be good…_dups – 12 times if comparing to stored function or 2 times comparing to just using available functions. With that speed I could even… using stored function used to take minutes! I don’t mean to say stored functions are bad and you should now rewrite all your functions

Post: Memory allocation in Stored Function

… non-trivial, I decided this task is good to try Stored Function. Function written – go ahead. Since 5 min I got totally frozen… in set (0.00 sec) and simple function I’ve found in MySQL manual: CREATE FUNCTION hello (s CHAR(20)) RETURNS CHAR… each call of Stored Function, but de-allocates it only at the end of statement. This makes usage of Stored Function very limited from…

Post: Withdrawal of Memory allocation in Stored Function

Returning to my post about memory consumption with Stored Function at this moment I want to annul that post. Trying …

Post: Statement based replication with Stored Functions, Triggers and Events

… when it needs to log “not usual” queries like Events, Functions, Stored Procedures, Local Variables, etc. We’ll learn what problems can… t VALUES(this_year())’ STORED PROCEDURES The behaviour of stored procedures and functions are completely different. If our stored procedure write data to our…

Post: A micro-benchmark of stored routines in MySQL

… how fast stored routines are in MySQL? I just ran a quick micro-benchmark to compare the speed of a stored function against… the subquery and basically rewrote it as a stored function. mysql> delimiter // mysql> create function speaks_english(c char(3)) returns integer deterministic… query can’t be optimized to use indexes, and the stored function is opaque to the optimizer. This is why I purposefully…

Post: Stored Function to generate Sequences

… help them to convert their sequence generation process to the stored procedure and even though I have already seen it somewhere… here for public benefit or my later use :) delimiter // create function seq(seq_name char (20)) returns int begin update seq… way of using this function allows you to “inject” the value to be returned next time this function is called. Sometimes people…

Post: MySQL EXPLAIN limits and errors.

… creates temporary table and so how much rows will be stored to temporary table. Sometimes it is enough to perform sorting… rows/sec. No info about functions cost Since MySQL 5.0 you may use user functions in your query which may also… outcome. The cost of functions is also not used in optimization which may produce suboptimal plans if stored functions are used in queries…

Post: When should you store serialized objects in the database?

… post explaining how they changed from storing data in MySQL columns to serializing data and just storing it inside TEXT/BLOB columns… clear loss in functionality. You can no longer easily perform aggregation functions on the data (MIN, MAX, AVG). You are storing the data… a standard serialization technique like JSON it’s difficult to store pieces of data like numbers or IP addresses in their…

Post: Testing MySQL column stores

… testing on a large data set against two MySQL column-store storage engines. I’d like to note that this effort… two different types of testing. The first focused on core functionality and compatibility of ICE (Infobright Community Edition) compared with MyISAM… the queries. ICE supports almost all of the MySQL aggregation functions. Notably, GROUP_CONCAT is not supported, which is something I…