Thursday, 11th March 2010.

Posted on Wednesday, 15th October 2008 by Balazs

Many drivers have ways to escape SQL strings to make sure no malicious activity is going on.  Usually you can use a function in the driver that can take care of that.  However, if all you need is too escape a single quote, you can also use the double quote method: 
reliability is key to gain [...]

Tags: , , ,
Posted in DB2 | Comments (Comments)

Posted on Thursday, 9th October 2008 by Balazs

When an attribute on a table is dropped, or the data type changes, DB2 sets the table into REORG PENDING state.  That prevents a number of operations on the table, which can be problematic for a production database.  If there is no way around such a structural change, then a REORG command needs to be [...]

Tags: , ,
Posted in DB2 | Comments (Comments)

Posted on Thursday, 9th October 2008 by Balazs

One of the challenges in query optimization is to make sure that the query optimizer works with accurate estimates on cost of the different possible decision branches in the optimization process.   The accuracy of the estimates depends on the efficiency of the stats collection. 
DB2 assumes the data distribution is constant distribution. And that’s why [...]

Tags: , , ,
Posted in DB2 | Comments (Comments)

Posted on Thursday, 9th October 2008 by Balazs

We have large amounts of data, and in development we have to often to bulk insert and updates by the millions.
DB2 allows us to dramatically speed up these operation by allowing to not log them.  The trick is to use:
ALTER TABLE <table_name> NOT LOGGED INITIALLY
However, one needs to be careful using this feature.  As DB2 [...]

Tags: ,
Posted in DB2 | Comments (Comments)