Skip to content

Instantly share code, notes, and snippets.

@yched
Created April 15, 2015 13:14
Show Gist options
  • Save yched/02820d9f6e949316d6a9 to your computer and use it in GitHub Desktop.
Save yched/02820d9f6e949316d6a9 to your computer and use it in GitHub Desktop.
Candidate index on node__body : entity_id, deleted, langcode
SELECT node_field_data.created AS node_field_data_created, node_field_data.nid AS nid
FROM node_field_data node_field_data
LEFT JOIN node__body node__body ON node_field_data.nid = node__body.entity_id
AND (
node__body.deleted = '0'
AND node__body.langcode = node_field_data.langcode
)
WHERE (
node_field_data.status = '1'
)
ORDER BY node_field_data_created DESC
LIMIT 10
OFFSET 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment