COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: gartmin on 27 Mar 2007 11:16:49 AM

Title: [RS] Contains vs. position function
Post by: gartmin on 27 Mar 2007 11:16:49 AM
I do a lot of filtering on character values among massive data sets (millions of records). I know I can filter records with contains {[var1] contains 'Character string'} or with a position statement {position('charactervalue', [var1]) > 0}

Any idea on which one is more efficient? Is there a better way?
Title: Re: [RS] Contains vs. position function
Post by: COGNOiSe administrator on 27 Mar 2007 02:03:35 PM
I'd have to say contains should be faster, sice the second approach requires two operations, but it will depend on the implementation of either.

How about LIKE? Or having a separate dictionary table, for each letter, all GUIDs of rows where it can be found?