Archives of the TeradataForum
Message Posted: Wed, 02 Sep 2009 @ 17:05:45 GMT
I've got a Fact table and we're searching for entries on this table by either the Sender Account number of the Receiver Account number (just to make sure we don't miss the entries on the Fact table).
The (simplified) query looks something like this :
EXPLAIN SELECT * FROM PRODCSSR_P.CON_CSSR_SIMULATION_V01 WHERE ACC_ID_SNDR = '000136943' OR ACC_ID_RCVR = '000136943'
I've got the table with a non-Unique Primary Index on ACC_ID_SNDR and a non-Unique Secondary Index on ACC_ID_RCVR.
Here's the explain plan, which I thought on first inspection was extremely good :
Someone, however, has cast doubt on the scalability of this Explain, on the grounds that it has an ALL AMPS portion to it.
Effectively, we have a Primary Index use and a Secondary Index use, but the latter using All Amps.
Oh, I should point out that I think there will be a bit of skew on the Primary Index (Skew Factor 40) and the Secondary Index is likely to be similar.
Do you guys reckon this is Scalable or does this make you want to take a sharp intake of breath ?
Oh, I should also point out that we do consider this to be a Tactical Query. I know technically that to qualify as 'tactical' it must be a Primary Index hit but, either way, we need it to return fast (which it does).
Also, we'll be moving from probably a hundred users to about a thousand users online.
Currently, we're working with around 100 Amps but this figure is likely to grow quite a bit.
I've got ideas for changing the structure if need be, but I'd rather not if I can get away with it, as it's working well currently as it is.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|