Performance About Parent-Child vs Duplicating Data

Hello Everyone,

I have two SQL table which are one to many relationship. Should i create parent-child relations or duplicate data in elasticsearch?

For example: Object1(Parent) has 100 records, Object2(child) has 1000 records.

-When creating parent-child relations, i have 1100 records in my index.
-When duplicate object1 data in object2 i have 1000 records in my index(object1 will be stored in object2).

In my model not too much duplicate data will be available(max 6 record). I have wildcard queries my search query.

Is elasticsearch better than working parent-child relationship vs duplicating data?

Thanks for helps.

IMHO in most cases it's better to do join at index time, so I'd:

duplicate object1 data in object2 i have 1000 records in my index(object1 will be stored in object2).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.