Currently browsing category

Programming Tips & Tricks

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 …

Understanding NULLIF and ISNULL

Understanding NULLIF and ISNULL Introduction One of my friends wants to know about two functions NULLIF and ISNULL. In this article I am trying to discuss about that. Understanding NULLIF First we look at the syntax of the NULLIF The syntax is: NULLIF(Expression, Expression) Return type: Return type is the …

Copying Table with INDEX and CONSTRAINTS

Copying Table with INDEX and CONSTRAINTS Introduction When we are trying to copy a table (Structure only or with Data) we are unable to copy the Indexes, constraint with it. Can we copy Indexes and Constraint with Table structure in the same database? This article is related to it. General …

Dynamic SQL result stored in a TABLE

Dynamic SQL result stored in a TABLE Introduction As we all know that the dynamic SQL is not good where performance is concern. But sometimes we don’t have other choices. As I personally think that, no developer chooses the dynamic SQL with interest, but they choose it as they have …

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 …

Delete

Accidental DELETE and UPDATE

Accidental DELETE and UPDATE Introduction Accidental DELETE and UPDATE?  Data loss… This article gives us a clear idea about it and what situation we can recover it. When we can recover 1.    If we perform DELETE and UPDATION within       TRANSACTION a simple ROLLBACK        TRANSACTION can …

Make PDFs searchable

Make PDFs searchable pre { background-color:#444; white-space:pre-wrap; font-size:80%; padding:0px 6px; } I searched for a good way to make scanned documents searchable. Most newer scanning software already has some OCR built-in, but what about all the old documents? Using pdfsandwich and Tesseract, we recover the text from each page of …

Columns Without Data Type

Columns Without Data Type Introduction  “Can you make a table with CREATE TABLE statement, where there are 4 columns and 1 of   the columns  is without data type?” If we heard this above statement, we definitely think for 2 to 3 seconds. That the columns without data type? The …

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, …