AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 22.03.2016, 09:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,626 / 848 (80) +++++++
Регистрация: 28.10.2006
dynamicsaxhints: How to restrict view datasource fields
Источник: http://dynamicsaxhints.blogspot.com/...ce-fields.html
==============

A view is specified by a query and there are two ways to define the view query - add existing query or add datasources to Metadata node:

Both options deal with datasources. It is recommended to restrict datasource fields and return only the fields which are actually used. Unused fields generate useless traffic and decrease performance. Is such recommendation relevant for the view Metadata?

Hints
Analyse the view CREATE script in SQL Server Management Studio. You can also jump to the conclusion section.

Solution
1. Let's analyse CustOpenInvoices view
CustOpenInvoices view is based on CustOpenInvoices query. All query datasources have Dynamic property set to Yes, it means that all fields are returned from the corresponding tables:
In fact the view uses only several fields returned from the query:
Let's find the view in SQL Server Management Studio and open CREATE script:
Even though the query returns all fields from the tables, only the view fields (plus system fields DataAreaId, Partition, RecId) are selected from database:

2. Let's analyse CustSalesOpenLines view
The view has datasources structure and all datasources have Dynamic property set to Yes:
The view uses only several fields returned from datasources:
Again only the view fields are selected from database:

Conclusion
If a view is based on an existing query and the query is used exclusively for the view, then it is not required to restrict the fields returned by the query, because only the view fields are fetched from the database.
If a view is based on datasources, then it is not required to restrict the fields of datasources either, because only the view fields are fetched from the database.

Источник: http://dynamicsaxhints.blogspot.com/...ce-fields.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
atinkerersnotebook: Using Power BI to Visualize Customer Saturation Blog bot DAX Blogs 1 07.08.2013 08:11
emeadaxsupport: Dynamics AX 2009 for Retail - Setting up a customer membership discount and how the discount fields correlate to the final price. Blog bot DAX Blogs 0 08.01.2013 04:25
dynamicsaxbi: Better together: Microsoft Dynamics AX 2012 R2 and SQL Server Power View Blog bot DAX Blogs 0 12.12.2012 13:11
axaptafreak: Getting new table fields into your form datasource Blog bot DAX Blogs 2 24.01.2008 22:51
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 19:09.