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:


From → Uncategorized

Leave a Comment

Leave a Reply

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

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

Facebook photo

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

Connecting to %s

%d bloggers like this: