Skip to content

DB2 LUW Generated Columns and Expression-Based Indexes

March 21, 2016

Prior to DB2 10.5, Expressed-based indexes were not available on DB2 LUW. But generated-columns have been around for a long time. With DB2 below version 10.5 you would need to create a generated-column and then an index on that column so the DB2 optimizer would use it. I’ve gotten huge performance improvements with generated-columns in the past, I mean order of magnitude type improvements. Well with 10.5 and above DB2 supports Expression-based indexes where you define the expression in the CREATE INDEX clause. So, going forward you will probably want to use the Expressed-based index feature instead of generated-columns. For the full benefits take a look at the DB2 Information Center:  https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0061101.html

 

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: