简体   繁体   English

Power BI和SQL Server索引

[英]Power BI and SQL Server Indexes

I've done some research without getting valuable information about my question. 我做了一些研究而没有得到关于我的问题的有价值的信息。

I'm working on a data warehouse project and one my customer's requirement is that to use power bi pro for data visualisation. 我正在开发一个数据仓库项目,我的客户要求是使用power bi pro进行数据可视化。

What is not clear to me is if power bi, while acquiring data in its data model, would or not benefit from the indexing structure developed in SQL Server. 我不清楚的是,在数据模型中获取数据时,power bi是否会受益于SQL Server中开发的索引结构。

Thank you in advance for recommendation/tips on this subject. 提前感谢您对此主题的推荐/提示。

It somewhat depends on whether you are using a live connection. 这在某种程度上取决于您是否使用实时连接。

Existing indexes may speed up data loading when using PowerBI in import mode where the data source is a view, query, or stored procedure. 在导入模式下使用PowerBI时,现有索引可能会加快数据加载,其中数据源是视图,查询或存储过程。

They will also be used in Live mode when connecting to the above sources, and might be used when connecting directly to multiple tables. 当连接到上述源时,它们也将在实时模式下使用,并且可以在直接连接到多个表时使用。

As the comments state, if you are bringing entire tables into PowerBI with import mode, then the existing indexes will not benefit you, and the internal SSAS instance that PBI uses is a whole different kettle of fish. 正如评论所述,如果您使用导入模式将整个表格带入PowerBI,那么现有索引将不会使您受益,并且PBI使用的内部SSAS实例是完全不同的鱼。

One caveat is that columnstore indexes can be used to get around some of the data size limitations when dealing with the gateway as described here: https://community.powerbi.com/t5/Power-Query/Using-SQL-Server-with-Nonclustered-Columnstore-Index/td-p/563787 , but that's not directly related to your question. 需要注意的是,在处理网关时,可以使用列存储索引来解决某些数据大小限制,如下所述: https//community.powerbi.com/t5/Power-Query/Using-SQL-Server-with -Nonclustered-Columnstore-Index / td-p / 563787 ,但这与您的问题没有直接关系。

Indexes help with retrieval speed on the server end. 索引有助于提高服务器端的检索速度。 The answer to how much it will help depends on the specifics of your situation. 它有多大帮助的答案取决于你的具体情况。 If you are doing a lot of data transformation and mashup in the Power BI query editor, indexes will only help where there is a step that selects rows from the SQL Server. 如果要在Power BI查询编辑器中执行大量数据转换和混搭,索引将仅在有从SQL Server中选择行的步骤时才有帮助。 It won't help with steps where the processing is being done on the Power BI end (such as merging with data from an Excel file or adding custom columns or some forms of substituting values). 它对于在Power BI端进行处理的步骤(例如与Excel文件中的数据合并或添加自定义列或某些形式的替换值)无济于事。 However, since you mention a data warehouse rather than a simple database, I'm going to assume you're barely doing any transformation on the Power BI end, relying instead on the server end to do the heavy lifting. 但是,由于您提到的是数据仓库而不是简单的数据库,我将假设您几乎没有在Power BI端进行任何转换,而是依靠服务器端来完成繁重的工作。 In that case indexes will definitely help speed things up if they're done strategically 在那种情况下,如果战略性地完成索引,那么索引肯定会有助于加快速度

There are some difference between Import mode and Connect live mode. 导入模式和连接实时模式之间存在一些差异。

Import mode: 导入模式:

Data import can be used against any data source type, it can combining Data from different sources. 数据导入可用于任何数据源类型,它可以组合来自不同来源的数据。 Current Power BI service limitation published file size is 1 GB. 当前Power BI服务限制发布文件大小为1 GB。

When using import, data are stored in Power BI file/service. 使用导入时,数据存储在Power BI文件/服务中。 Therefore, there is no need to setup permissions on data source side (service account for load is enough) and you can share data publically or with people outside organization. 因此,无需在数据源端设置权限(负载的服务帐户就足够了),您可以公开地或与组织外的人员共享数据。 On the other hand, all data are stored on Power BI. 另一方面,所有数据都存储在Power BI上。 It is supported to implement full DAX expressions and full Power Query transformations. 它支持实现完整的DAX表达式和完整的Power Query转换。

Connect live mode: 连接实时模式:

There are more limitations for live connection in place. 现场连接存在更多限制。 It doesn't work against all data sources. 它不适用于所有数据源。 Current list can be seen here , it cannot combine data from multiple sources. 可以在此处看到当前列表,它无法组合来自多个源的数据。

You are also limited to just one data source/database you selected. 您也仅限于您选择的一个数据源/数据库。 You can't combine data from multiple data sources anymore. 您无法再组合来自多个数据源的数据。 If you are connected to SQL Database, you can still create logical relationships between objects from that database as well as measures and calculated columns. 如果已连接到SQL数据库,则仍可以在该数据库中的对象以及度量和计算列之间创建逻辑关系。 When you are connected to SQL Server Analysis Services, you are limited just to report layout and even can't make calculated columns ,while you can only create measures currently. 连接到SQL Server Analysis Services时,仅限于报表布局,甚至无法生成计算列,而您当前只能创建度量。 When using live connection, users have to have access to underlying data source. 使用实时连接时,用户必须能够访问基础数据源。 This means you can't share outside of your organization or publically. 这意味着您无法在组织外部或公开地共享。 And It is not supported to implement full DAX expressions, only Report Level Measures, to learn more about report level measures, watch this great video from Patrick, and there is no Power Query transformations. 并且不支持实现完整的DAX表达式,仅支持报告级别度量,了解有关报告级别度量的更多信息,观看Patrick的这个精彩视频,并且没有Power Query转换。

You can learn more: directquery-live-connection-or-import-data-tough-decision 您可以了解更多信息: directquery-live-connection-or-import-data-tough-decision

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM