SELECT Failed. [3540] Number of tables in join exceeds Parser limit.

Database
Teradata Employee

SELECT Failed. [3540] Number of tables in join exceeds Parser limit.

Hello,

 

The query has 394 instances of the same table.

 

Structure is  :

 

Select a,b from XYZ where j in (sel from t1 where --) and h in sel from t1 where --)

Or

(

G in in (sel from t1 where -- ) and h in sel from t1 where -- )

)

or

F in in (sel U from t1 where -- ) and h in (Usel from t1 where -- ))

(excuse the braces-) 

 

and this goes on.(The where clauses are different ).

 

T1 is repeated 394 times and it hits the error.

SELECT Failed.  [3540] Number of tables in join exceeds Parser limit.

 

What exactly is the limit the parser can handle. Its a 250 amp system.

Do we have any parameters in DBC to increase the limit of the tables parser can handle.i read some where there is something like MaxParseTreeSegs value.Is that so.

Any suggestions?

Thanks

Aravind

Tags (1)
1 REPLY
Enthusiast

Re: SELECT Failed. [3540] Number of tables in join exceeds Parser limit.

Teradata Supports 128 joins on a single query. One possible solution is you can create volatile/Temporary tables of chunks of this query and then perform select on those multiple volatile tables.

Khurram