2 fields for de-duplication in 1 record


For instance I have this record format of the show object:

    "showName": "Ang Probinsyano",
    "type": "show"
    "blurb": "Follow the journey of twins Ador and Cardo (both played by Coco Martin), who were estranged from each other by financial reasons. Despite this, they followed the path of law enforcement. Ador was a celebrated police officer, with a loving family as his support. Cardo, on the other hand, loves the solitude of the mountains as a Special Actions Forces Trooper. Their lives take a turn when Ador gets himself entangled in a syndicate which leaves him dead. To cover for this fact, Cardo was ordered to pretend to be his brother - even to his family - and be reunited with the grandmother he detests. How will Cardo fit in with the life of his brother, Ador, which is an entire world’s difference from the one he used to live? Will he ever get the chance to avenge his brother?",
    "episode": {
        "episodeName": "Ang Probinsyano Aug 3, 2017"
        "dateAired": "Aug 3, 2017",
        "synopsis": "Delfin (Jaime Fabregas) chooses to hide Ador’s (Coco Martin) death and claim that the demised police officer is just doing an assignment somewhere confidential. Delfin then meets with the high-ranking officials of the Philippine National Police (PNP) to suggest that Ador’s unfinished mission be given to Cardo (also played by Coco Martin), a member of the Special Action Force (SAF) who happens to be Ador’s twin brother."

As per the documentation, long blurbs may be splitted to several records for performance reasons.

Also, as far as the data structure is concerned, one show can have multiple episode object. As per the previous advise, because the number of episode objects in one show may reach from 100 to 500 records, it is best to have one episode object per one show, and that will result in multiple duplicate of show object and where the DISTINCT feature will be used for. However, as you may notice in the structure, the blurb field contains long text as well as the synopsis field in the episode object and hence, make it qualified for splitting into multiple records.

My question is given that case, what would be the best approach I can do for that?

Thank you very much and looking forward to your feedback.

Hey :wave:

I answered you on this topic here: Here's my index, how can I still optimize this?