Join query timeout

The following Join query is getting timed out

select distinct r._id FROM content r
JOIN content a ON a.assessmentId = r._id
and a._type=“answersheet”
WHERE r._type = ‘assessment’

Here r the indexes, i have created
CREATE INDEX ix1 ON content(_id,_type) WHERE (_type = “assessment”)
CREATE INDEX ix2 ON content(_id,_type,assessmentId) WHERE (_type = “answersheet”)

it is getting timed out after 10 minutes.How can i resolve it? plz help.

CREATE INDEX  `ix1`  ON  `content` ( `_id`  ) WHERE ( `_type`  = “assessment”)
CREATE INDEX  `ix2`  ON  `content` (  `assessmentId`, _id ) WHERE ( `_type`  = “answersheet”)

You don’t have any predicates almost doing cross join. Also try switch joins.