- Issue created by @joachim
9. Remove any other fields (e.g. Title) from the View, they are not needed
and will only unnecessarily make the database search more resource heavy
on the system. i.e. just add the one field to the View, the field nid.
(Tip: you can create your View however you like, but removing unneeded
lookups is the most efficient on system resources. You probable also
don't need the default sort criteria: Content: Post date (desc). Drupal
normally returns the content in a sensible ID order without processing
the Post date.
I think this is no longer the case in D8+ views -- the relationship entity is loaded anyway, whatever fields you add -- here we access it without loading anything:
protected function getResultEntity(ResultRow $row) {
return $this->options['relationship']
? $row->_relationship_entities[$this->options['relationship']]
: $row->_entity;
}
Active
2.0
Documentation