Currently browsing tag

performance

Performance

INNER or LEFT JOIN for Performance

INNER or LEFT JOIN for Performance In this article I am trying to discuss a very common scenario that between INNER JOIN and LET JOIN which one is increase the performance and also discuss how to boost the join performance. First look at the definition of both INNER and LEFT …

IN EXISTS clause and their performance

“IN”, “EXISTS” clause and their performance Introduction To improve the performance of the Query, the general guideline is not to prefer the “IN” Clause. The guideline of the MS SQL query performance says that if we needs “IN” clause, instead of using “IN” clause we must use the “EXISTS” clause. …

Function in WHERE clause

Function in WHERE clause Introduction When we are using the function in the SELECT statement it returns data depends on the number of records retrieve by the select statement and what type of value is passed in the scalar function. The performance of the MS SQL Query is little bit …

Improve the performance by Execution Plan

Improve the performance by Execution Plan Introduction Developers ask a common quest “How to improve the performance of a SQL Query”. It is not so easy to answer as lot of factors is related to it. There are some general guidelines that we can follow to improve the overall performance …

php

Building PHP extensions with C the easy way

Here is an easy way to build a PHP extension with C++ and default PHP packages on a Ubuntu system. I use SWIG to wrap C++ code to the Zend API. When using loops and recursion intensively, porting a few functions to C++ can give you some extra power. First, …

Runtime vs memory usage

Runtime vs. memory usage pre { background-color:#444; white-space:pre-wrap; font-size:80%; padding:0px 6px; } Oftentimes, better runtime can result in higher memory usage. Here is an example to create some strings to test bulk inserts on Redis: $cmd = “”;$start = microtime(true);for ($i=0; $i

Inserted Scanning Performance

Inserted Scanning Performance Introduction Here there is an interesting case scenario mentioned bellow. We’re pulling values from an “inserted” table that is created in aninsert trigger. When we do an insert and view the execution plan inQuery Analyzer, the “Inserted Scan” accounts for 98% of the entirequery cost So, in …

PHP Framework Comparison

PHP Framework Comparison Reading about PHP frameworks, you’ll get a lot about Symfony and Zend Framework. It is true that these frameworks have a lot of features and do great marketing. But what about performance and scalability? There are 2 kinds of frameworks: those written in C as an extension …

Members set get ArrayAccess and Iterator

Members, __set, __get, ArrayAccess and Iterator pre { background-color:#444; white-space:pre-wrap; font-size:85%; padding:0px 6px; } Lessons learned: __set() is 5 times slower than setting a member __get() + __set() is 13 times slower than incrementing a member Iterator is 4 times slower than using a member ArrayAccess is 3 times slower …

How to implement a real life benchmark with PHP

How to implement a real life benchmark with PHP pre { background-color:#444; white-space:pre-wrap; font-size:80%; padding:0px 6px; } To determine the maximum capacity of a web page, Apache ab is often used in the first step. Fetching one URL very often is optimal for caching and gives a best case. To …

Mass inserts updates SQLite vs MySQL update delayed inserts

Mass inserts, updates: SQLite vs MySQL (update: delayed inserts) pre { background-color:#444; white-space:pre-wrap; font-size:85%; padding:0px 6px; } Lessons learned: SQLite performs inserts 8-14 times faster then InnoDB / MyISAM SQLite performs updates 4-8 times faster then InnoDB and as fast as MyISAM SQLite performs selects 2 times faster than InnoDB …

MySQLi prepared statements

MySQLi prepared statements pre { background-color:#444; white-space:pre-wrap; font-size:85%; padding:0px 6px; } Lessons learned: Prepared statements are 13 percent faster than normal statements with escaping Prepared statements are 8 percent faster than normal statements without escaping To get improvements, you need at least 10000 inserts for 1 statement Using insert…set is …