Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

sr_qlikview
New Contributor III

why to avoid synthetic keys

Hello All,

I just started learning qlikview,Can some one help me understand why do we have to avoid synthetic keys and how will effect the performance.

Thank you in advance

3 Replies

Re: why to avoid synthetic keys

See this discussion. In short synthetic keys usually mean you made some mistakes constructing your data model. If you fix the problems of the model the synthetic keys are likely gone as well.


talk is cheap, supply exceeds demand
dvqlikview
Honored Contributor II

Re: why to avoid synthetic keys

Hi,

Synthetic Keys are always not bad thing to have. Although, as a rule you should avoid them and work on your model. You can use Hash128() and Autonumber() functions to build concatenated field keys. These functions are less rescource consuming.

Cheers,

DV

www.QlikShare.com

Employee
Employee

Re: why to avoid synthetic keys

Just as Deepak indicates in his last post, synthetic keys are not always bad. Rather, you should ask yourself "Do I want two keys between these two tables?".

If yes, then you could leave it as it is or create a composite key with Hash128(Key1 & Key2) or Autonumber(Key1 & Key2). Either way, it will improve the data model. (If the synthetic affects3 tables, a composite key may be necessary.)

But if you don't want two keys, one of the keys should be removed by renaming a field.

HIC

Community Browser