Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Which will be faster?

H ello,

I've fields more than 300 as shown below.

ID ,    LensKey  ,   Brand, CaptureDateTime,....................................

PartA

load * from table

WHERE CaptureDateTime > DATE('$(vIndividualMaxCapDate)'-($(vNDates)-1),'DD/MM/YYYY')

             and If(Len('$(vBrand)')>0,SubStringCount('$(vBrand)',Brand)>0,WildMatch(Brand,'*'))

                              and If(Len('$(vSpherePower)')>0,SubStringCount('$(vSpherePower)',SpherePower)>0,WildMatch(SpherePower,'*'))

                              and If(Len('$(vBaseCurve)')>0,SubStringCount('$(vBaseCurve)',BaseCurve)>0,WildMatch(BaseCurve,'*'))

          ........

         ..............

         ..............

PartB

Table1:
load LensKey  from table1

WHERE CaptureDateTime > DATE('$(vIndividualMaxCapDate)'-($(vNDates)-1),'DD/MM/YYYY')

             and If(Len('$(vBrand)')>0,SubStringCount('$(vBrand)',Brand)>0,WildMatch(Brand,'*'))

               and If(Len('$(vSpherePower)')>0,SubStringCount('$(vSpherePower)',SpherePower)>0,WildMatch(SpherePower,'*'))

               and If(Len('$(vBaseCurve)')>0,SubStringCount('$(vBaseCurve)',BaseCurve)>0,WildMatch(BaseCurve,'*'))

          ........

         ..............

         ..............


Left join(Table1)


load * from table1

I want to know which code will be faster. Whether PartA or PartB code.


1 Reply
rbecher
MVP
MVP

Hi Jacq,

I presume PartA, because it's only one load and the amount of calculated where conditions is equal.

BTW, what is the idea behind those WildMatch(.., '*') conditions? I think it would be possible to reduce complexity of the where clause.

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine