in data vault 2.0 one hashes the business key and takes this hash as a primary key of the table. Also Link Tables use the hash primary key to create a relationship.
My problem is with hashes that are basically random, the query optimizre cannot apply any good estimation since the statistics - of course - are not usable for random distributed data.
So the query optimizer uses weird planes where he wants to sort often (because it thinks there are only 4 rows to sort). Since i am surely not the first one to deal with data vault in sql server, how is this fixible?.
When query optimizer uses an index seek or a join operator it completely misses the row estimation hence chooses ridiculous plans.
I have to pimp them with join hints and query hints such as (FORCE ORDER) to get anything out of it.
Whats the common approach for this?
Aucun commentaire:
Enregistrer un commentaire