Aug
26
2009
--

Free Zend Framework-based code generator from UML2 models

You are looking for a way to quickly setup the Zend Framework? You are tired of wasting time in writing repetitive sections of code over and over again? You are looking for improvement in the development time? You would like to have a rapid prototyping tool for very early system demonstration?
Make the switch to the BOZA Framework – the faster, easier, better way to generate your Zend® based PHP application.

Aug
25
2009
--

Zend Framework 1.9.2 Released

The Zend Framework team is pleased to announce the immediate availability of
the 1.9.2 release. This release is the second maintenance release in the 1.9
series. Over 40 issues have been resolved for this release, covering more
than 15 different components.

You may download it from the Zend Framework site .

Aug
24
2009
--

Accepting Credit Card Payments with OXID eShop CE and AlertPay

OXID eShop CE is a modular, standards-compliant shopping cart system that can be modified to work with any payment gateway. This article follows up on a previous tutorial, explaining how to extend the OXID base classes and get them working with a redirection-based payment gateway named AlertPay.

Aug
24
2009
--

Matthew Weier O’Phinney’s Blog: Autoloading Doctrine and Doctrine entities from Zend Framework

Matthew Weier O’Phinney has a new post on something he’s been asked about a lot – autoloading Doctrine into a Zend Framework application.

Aug
20
2009
--

xtrabackup-0.9

Dear Community,

The release 0.9 of the opensource backup tool for InnoDB and XtraDB is available for download.

Changelog:

  • tar4ibd could not treat over 8GB file, now max 64GB
  • prepare-speed-hack is added

Fixed bugs:

The binary packages for RHEL4,5, Debian, FreeBSD, MacOS as well as source code of the XtraBackup is available on http://www.percona.com/mysql/xtrabackup/0.9/.

The project lives on Launchpad : https://launchpad.net/percona-xtrabackup and you can report bug to Launchpad bug system:
https://launchpad.net/percona-xtrabackup/+filebug. The documentation is available on our Wiki.

For general questions use our Pecona-discussions group, and for development question Percona-dev group.

For support, commercial and sponsorship inquiries contact Percona.


Entry posted by Aleksandr Kuzminsky |
One comment

Add to: delicious | digg | reddit | netscape | Google Bookmarks

Aug
19
2009
--

Indexing Email Messages with PHP, Zend Lucene and Sphinx

The Zend Framework provides an implementation of the Lucene search engine that can be used for full-text search. And there’s also Sphinx, the standalone (and very fast) full-text indexer for MySQL, PostgreSQL and XML content. This article looks at these two implementations, comparing and contrasting them and illustrating how they can be used to add full-text search to an application.

Aug
19
2009
--

Ralph Schindler’s Blog: Dynamic Assertions for Zend_Acl in ZF

Ralph Schindler has a new post to his blog today looking at using dynamic assertions with the access control component (Zend_Acl) of the Zend Framework.

Aug
18
2009
--

Flex for PHP Developers

Mihai Corlan, one of Adobe’s platform evangelists, has written a rather exhaustive introduction to programming in Flex, specifically for current PHP developers.

Aug
17
2009
--

XtraDB storage engine release 1.0.3-7

Dear Community,

Today we are announcing XtraDB release 7.
This is the last release based on InnoDB plugin version 1.0.3, as you might know Innobase has released 1.0.4.

The release includes following new features:

  • MySQL 5.1.37 as a base release
  • speed hack for buf_flush_insert_sorted_into_flush_list controlled by the new variable innodb_fast_recovery

Fixed bugs:

The builds for RedHat4,5 and Debian are located on http://www.percona.com/mysql/xtradb/5.1.37-7/
The latest source code of XtraDB, including development branch you can find on LaunchPAD.

Please report any bugs found on Bugs in Percona XtraDB Storage Engine for MySQL.
For general questions use our Pecona-discussions group, and for development question Percona-dev group.

For support, commercial and sponsorship inquiries contact Percona


Entry posted by Aleksandr Kuzminsky |
6 comments

Add to: delicious | digg | reddit | netscape | Google Bookmarks

Aug
16
2009
--

A micro-benchmark of stored routines in MySQL

Ever wondered how fast stored routines are in MySQL? I just ran a quick micro-benchmark to compare the speed of a stored function against a “roughly equivalent” subquery. The idea — and there may be shortcomings that are poisoning the results here, your comments welcome — is to see how fast the SQL procedure code is at doing basically the same thing the subquery code does natively (so to speak).

Before we go further, I want to make sure you know that the queries I’m writing here are deliberately mis-optimized to force a bad execution plan. You should never use IN() subqueries the way I do, at least not in MySQL 5.1 and earlier.

I loaded the World sample database and cooked up this query:

SQL:

  1. SELECT sql_no_cache sum(ci.Population) FROM City AS ci
  2.   WHERE CountryCode IN (
  3.     SELECT DISTINCT co.Code FROM Country AS co
  4.       INNER JOIN CountryLanguage AS cl ON cl.CountryCode = co.Code
  5.     WHERE lower(cl.LANGUAGE) = ‘English’);
  6. +——————–+
  7. | sum(ci.Population) |
  8. +——————–+
  9. |          237134840 |
  10. +——————–+
  11. 1 row IN SET (0.23 sec)

This pretty consistently runs in just about 1/4th of a second. If you look at the abridged explain plan below, you’ll see the query is doing a table scan against the first query, and then executing the subquery for each row:

SQL:

  1. mysql> EXPLAIN SELECT ….\G
  2. *************************** 1. row ***************************
  3.            id: 1
  4.   select_type: PRIMARY
  5.         TABLE: ci
  6.          type: ALL
  7. possible_keys: NULL
  8.           KEY: NULL
  9.       key_len: NULL
  10.           ref: NULL
  11.          rows: 4079
  12.         Extra: USING WHERE
  13. *************************** 2. row ***************************
  14.            id: 2
  15.   select_type: DEPENDENT SUBQUERY
  16. *************************** 3. row ***************************
  17.            id: 2
  18.   select_type: DEPENDENT SUBQUERY

Now I took the subquery and basically rewrote it as a stored function.

SQL:

  1. mysql> delimiter //
  2. mysql> CREATE FUNCTION speaks_english(c char(3)) returns integer deterministic
  3.     > begin
  4.     > declare res int;
  5.     > SELECT count(DISTINCT co.Code) INTO res FROM Country AS co INNER JOIN CountryLanguage AS cl ON cl.CountryCode = co.Code WHERE lower(cl.LANGUAGE) = ‘English’ AND co.Code = c;
  6.     > RETURN res;
  7.     > end//
  8. mysql> delimiter ;

Now the query can be rewritten as this:

SQL:

  1. mysql> SELECT sql_no_cache sum(ci.Population) FROM City AS ci WHERE speaks_english(CountryCode)> 0;
  2. +——————–+
  3. | sum(ci.Population) |
  4. +——————–+
  5. |          237134840 |
  6. +——————–+
  7. 1 row IN SET (1.00 sec)

If we explain it, we get output similar to the first table shown above, but the further two rows are not shown. The query can’t be optimized to use indexes, and the stored function is opaque to the optimizer. This is why I purposefully wrote the subquery badly in the first query! (If you think of a better way to compare apples and uhm, apples… please comment).

The poorly-optimized-subquery portion of the query essentially happens inside that function now.

And it’s four times slower, consistently, and that’s all I wanted to show here. Thanks for reading.


Entry posted by Baron Schwartz |
7 comments

Add to: delicious | digg | reddit | netscape | Google Bookmarks

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com