Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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