antd表格列搜索日期_表格模型日期时间列优化

antd表格列搜索日期

表格模型-日期时间列优化 (Tabular model — datetime columns optimization)

Image for post

I want to show you how you can optimize your model size by splitting datetime column into separate date and time columns and how it affects on model size.

我想向您展示如何通过将datetime列拆分为单独的日期和时间列来优化模型大小,以及它如何影响模型大小。

I have Posts table in my StackOverflow SQL Server Database. It size is 120GB and 46 947 633 rows.

我的StackOverflow SQL Server数据库中有Posts表。 它的大小是120GB和46947633行。

Image for post

We don’t need all columns like Body, Tags, Title for analysis purposes, so I deleted a few.

为了分析目的,我们不需要诸如正文,标签,标题之类的所有列,因此我删除了一些。

Image for post
This is our table. It’s size is 3.5GB in a database.
这是我们的桌子。 它在数据库中的大小为3.5GB。

I put that table into a SSAS model. It size grew to 6.2GB, not so good.

我将该表放入了SSAS模型。 它的大小增加到6.2GB,不是很好。

Image for post

But we can notice that the largest columns are CreationDate, LastActivityDate and LastEditDate. The size of these three columns is 5.9GB.

但是我们可以注意到,最大的列是CreationDate,LastActivityDate和LastEditDate。 这三列的大小为5.9GB。

What can we do?

我们可以做什么?

Best approach is spitting datetime column into separate date and time column.

最好的方法是将datetime列拆分为单独的日期和时间列。

After we imported view into tabular model our model size is 3.9GB.

将视图导入表格模型后,模型大小为3.9GB。

Image for post

As we can see date columns are smaller, but time columns are large. Why? Because they contains milliseconds which implicit large cardinality. Lets try to trim milliseconds and see and what happens.

我们可以看到,日期列较小,而时间列较大。 为什么? 因为它们包含毫秒,所以隐含了大基数。 让我们尝试减少毫秒数,看看会发生什么。

Our model size is 780MB.

我们的模型大小为780MB。

Image for post

On this stage we can start celebrationg our success. We deceased model size from 6.2GB to 780MB. But, do we need seconds in time columns? Seconds are rarely useful in reports and measures, so we can round time to full minutes. By the way lets do the same thing with CommunityOwnedDate and ClosedDate fields.

在这个阶段,我们可以开始庆祝我们的成功。 我们将模型大小从6.2GB减少到780MB。 但是,我们是否需要时间列中的秒数? 秒在报告和度量中很少有用,因此我们可以将时间取整到整分钟。 顺便说一下,让我们对CommunityOwnedDate和ClosedDate字段执行相同的操作。

Image for post

Model size is 597MB. We reduced model size by 90%.

型号大小为597MB。 我们将模型尺寸减少了90%。

翻译自: https://medium.com/@michalmolka/tabular-model-datetime-columns-optimization-113aba92e5fe

antd表格列搜索日期

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值