与使用存储过程方法相比,DBT的使用情况如何?
我已经很长时间以来一直使用存储过程
方法。
作为销售报告生成的一部分,我创建存储过程
join/inoun all
数据库中的mulitple表,并使用python
使用它。
现在DBT
如今是一个热门话题。
从存储过程
移动到dbt
的优点是什么? 将我的整个存储过程迁移有任何意义
从存储的proc到dbt
?
I have been using stored procedure
method for a long time now.
As a part of sales report generation, I create stored procedures
to join/union all
mulitple tables in database and call it using python
whenever i need it.
Now DBT
is a hot topic these days.
Whats the advantage of moving to DBT
from stored procedures
?
Is there any point in migrating my entire stored procedure
stack from stored proc to DBT
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
DBT的一些主要好处是:
更多信息在其 Docs 以及其网站上的营销材料GetDbt.com
Some of the major benefits of dbt are:
More info in their docs and marketing materials on their website, getdbt.com
如您所确定的,DBT在功能上与存储过程相似,并带有一些附加功能。
为了拥有DBT提供的功能,源控制等。数据库之外存在DBT。尽管您可能会获得DBT的功能,但您还将失去存储过程的功能,例如,使用临时表,变量或创建参数化查询的功能。
您还将受到DBT使用视图来执行和管理查询的限制。这将您限制在视图中的DB允许允许的语言中,并且与使用过程相比,您将没有更多的选择来提高查询性能。
请记住,DBT中功能的某些功能有许多主要DBS:
As you've identified, dbt is functionally similar to a stored procedure, with some extras.
In order to have the functionality offered by dbt, source control etc. dbt exists outside of the database. While you might gain the features of dbt, you will also lose the functionality of a stored procedure, e.g., the ability to use temp tables, variables, or create parameterized queries.
You will also be constrained by dbt's use of Views to execute and manage queries. This limits you to language features your DB permits in Views and you wont have as many options to improve query performance than you would if you use a procedure.
Keep in mind that some of the functionality in dbt is available many major DBs: