Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292987

[Meta] Views integration with EFQ2

$
0
0

Follow up for #1498674: Refactor node properties to multilingual

Problem/Motivation

#2004314: Add contextual information about languages in queries adds language to queries sprinkled around in core. Should also be done for views.
Views are still using {node} as base table in properties to multilingual, which is not ideal for performance, since queries cannot use the field data indexes.

After this issue, views will use EFQ2 and the entity storage controller will automatically generate the most appropriate queries.

We need to consider that as soon as we start translating nodes, we will have a row for each translation in the result for every view sorting or joining on node fields

Proposed resolution

Make entity storage controller automatically generate the most appropriate queries.

It might be possible to solve this while working on a proper integration between Views and EFQ2.

If Views relies on EFQ2 to query entities then the entity storage controller can automatically generate the most appropriate queries, since EFQ2 already supports data tables.

It would probably make sense to have an implicit filter selecting only rows from the data table with default_langcode = 1, if no explicit language filter is defined.

Original report in issue summery of #1498674: Refactor node properties to multilingual

Views integration: views are still using {node} as base table, which is not ideal for performance, since queries cannot use the field data indexes. It should be possible to solve this while working on a proper integration between Views and EFQ2. If Views relies on EFQ2 to query entities then the entity storage controller can automatically generate the most appropriate queries, since EFQ2 already supports data tables.
Aside from the perfomance issues, we need to consider that as soon as we start translating nodes, we will have a row for each translation in the result for every view sorting or joining on node fields. It would probably make sense to have an implicit filter selecting only rows from the data table with default_langcode = 1, if no explicit language filter is defined. Again this would be taken care of by EFQ2 if we get proper integration with Views.


Viewing all articles
Browse latest Browse all 292987

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>