Showing entries 37331 to 37340 of 44038
« 10 Newer Entries | 10 Older Entries »
Next Big Thing: Scala

My buddy David Pollak, host of a local geekbeer social event, thinks Scala is the next big thing in web programming.  Scala is an object-oriented / functional programming language that compiles down to Java byte code.  It's statically typed but fully supports generics and polymorphism.  And it's published under an open source BSD-like license. 

David's got pretty good street cred; he's built large scale applications in everything from C++, C#, Ruby and pretty much everything else in between.  Over lunch recently he told me in a rather offhand fashion that he used Scala and the related lift framework to write a Twitter clone (called Skittr) in 800 lines that scales to 1 …

[Read more]
MySQL - to use or not to use

Reading this slashdot article today and two CIO magazine articles linked from it.

Such discussions started at right place at right time always attract a lot of flamers and can be fun to read.

What hit me this time is quality of the articles in CIO magazine. If this is what managers suppose to use to make their "informed" decisions about products, not a big surprise huge portion of IT budgets are wasted. It looks like someone who has not got a clue is writing for someone who does not even pretend. I see zero "meat" - mostly using of marketing materials. This applies both to pro-MySQL and against-MySQL articles.

The funniest argument for me was the age of the product. Where does this "older is better" comes from ? Oh yes I know, it comes from the point of view market old timers try to show the value of their …

[Read more]
"compile-in" method v.s. "sampling" method

There are two approaches to do the profiling, i.e. compile-in and sampling.
Compile-in is a method to record the timing of executing each component or function, and the one using the longest time is considered the bottleneck.
Sampling is a method to periodically check what the current active component is, and the one
appearing most frequently is considered the bottleneck.

Compile-in needs to instrument the source code, and may affect the performance due to the overhead of counting and logging. To implement compile-in method, one way is to instrument the source code directly, for instance, using macros to redefine the calls and recompile. We are thinking to use aspect of programming techniques to help the instrumentation so that we can keep the instrumented code and the original code separately.

Sampling involves interrupting the process, and grabbing a stack trace. Sampling may affect the performance …

[Read more]
Site interruptions this weekend

hackmysql.com is moving to (mt) Media Temple this weekend. Because of Memorial Day, I suspect that site traffic will be really low, so perhaps no one will even notice.

Automating mantenance tasks on MySQL

I'm trying to automate some trivial maintenance tasks for my own MySQL server, and trying also to minimize the effort, so ... Here is the recipe:

Take an excellent generalized stored procedure like the one by Konstantin Osipov, see "Dynamic SQL is Stored Procedures" on MySQLForge (example 4).
Tune it a bit so that it takes into account only non system tables (I'm trying to turn it into something similar to Microsoft's sp_MSforeachtable), here is the code:

  1. DELIMITER $$
  2. DROP PROCEDURE IF EXISTS `test`.`sp_4_each_table` $$
  3. CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_4_each_table`(db_name VARCHAR(64), template VARCHAR(21845))
  4. BEGIN
  5. #
  6. DECLARE done INT DEFAULT 0;
  7. #
  8. DECLARE tname VARCHAR(64);
  9. #
  10. DECLARE c …
[Read more]
How To Be Recruited By Google

My pal Jeff Barr of Amazon posted on his personal blog about how he was interviewed by Google and continues to get pinged by their recruiters after he already gave them a polite "no thanks". He asks whether their recruiters shouldn't maybe have way of looking up candidates in some sort of database -- you know, maybe like a search engine?

I don't think I've blogged about this yet, but I interviewed at Google from late 2005 through early 2006. The experience was pretty strange. Google kept me on the hook for five full months, having me in repeatedly for meetings with people who had no idea why they were talking to me or what to ask me, putting me in front of middle managers who would theoretically be my superiors but who had far less experience than me, handing me off from one recruiter to another, and never getting back to me when they promised to.

In one of the …

[Read more]
Partition pruning tip: Use comparisons of column, not of partitioning function value

A customer issue has drawn my attention to this this pecularity: if partitioning is done by the value of some function, then partition pruning module will make use of comparisons of the partitioning column(s), but not of comparisons of the value of the partitioning function. Here is an example:

CREATE TABLE t1 ( recdate  DATETIME NOT NULL, ... )
PARTITION BY RANGE( TO_DAYS(recdate) ) (
  PARTITION p0 VALUES LESS THAN ( TO_DAYS('2007-01-01') ),
  PARTITION p1 VALUES LESS THAN ( TO_DAYS('2007-02-01') ),
  ...
);
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE recdate='2007-01-15';
+----+-------------+-------+------------+------+-...
| id | select_type | table | partitions | type |
+----+-------------+-------+------------+------+-...
|  1 | SIMPLE      | t1    | p1         | ALL  |
+----+-------------+-------+------------+------+-...

EXPLAIN PARTITIONS SELECT * FROM t1 WHERE TO_DAYS(recdate)=TO_DAYS('2007-01-15'); …
[Read more]
Coding Environment Setup

1. How to build PBXT with MySQL
2. How to use SysBench
3. PBXT code download
4. SysBench code download
5. MySQL5.1 code download

Introduction of the "PAT" project

This project is one of the Google Summer of Code 2007 projects for MySQL.

I am a graduate student of University of Toronto, and my mentor of this project is Paul McCullagh.

The goal of this project to provide a performance analysis tool for a MySQL storage engine PrimeBase XT. We aim to help developers to locate the bottleneck of the system. In contrast to traditional profiling tools, we focus on how to capture the impact of the resource contention through measuring the time spent on waiting critical resources, such as I/O, memory and locks. We also try to provide context information to help developers to identify the critical path.

Why Doesn?t MySQL support Millisecond DATETIME Resolution?

Apparently, there’s been an outstanding bug for nearly two years for MySQL to add support for millisecond storage in DATETIME and TIME data types.

A microseconds part is allowable in temporal values in some contexts, such as in literal values, and in the arguments to or return values from some temporal functions. Microseconds are specified as a trailing .uuuuuu part in the value. Example:

However, microseconds cannot be stored into a column of any temporal data type. Any microseconds part is discarded.

What’s this about? I have to admit that I’ve known about this problem for about the same amount of time (probably three years).

At Rojo we used BIGINTs as timestamps which provided millisecond …

[Read more]
Showing entries 37331 to 37340 of 44038
« 10 Newer Entries | 10 Older Entries »