AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-32232

abianari's questions

Martin Hope
abianari
Asked: 2014-01-22 03:26:33 +0800 CST

Sql Server 完整备份持续时间大幅增加

  • 0

自上周以来,我的完整备份急剧增加。上周之前的时间约为 3 小时,现在时间约为 6 小时。此外,一些查询需要很长时间才能运行。(不是所有查询)。我认为问题与磁盘 I/O 有关。我尝试将一些文件从一个硬盘驱动器复制/粘贴到另一个硬盘驱动器,并且完成得非常快。(4-5 秒内 3 GB)。所有使用临时表的查询工作都变慢了。它与 I/O 或什么有关..?

sql-server-2008 performance
  • 1 个回答
  • 225 Views
Martin Hope
abianari
Asked: 2014-01-21 06:10:21 +0800 CST

非集群索引增长非常快到 30 的碎片

  • 2

我有大约 700 万条记录的表。索引碎片约为 90。

我尝试为所有索引重建索引。它工作正常,但在每晚工作碎片化后,其中一个none cluster index增长到 30 。每天晚上我都会截断这个表并向其中插入新记录,然后更新一些列(非聚簇索引(不是我提到的列))。我不知道为什么 index( IX_Customer_Code) 的碎片增长得很快。桌上的工作量:

1-每晚截断。2-插入约700万条记录。3- 更新Customer_Key(在插入时得到 Null)。

我有问题IX_CustomerCode

name                index_type_desc          page_count
IX_CustomerCode     NONCLUSTERED INDEX             17,323 
IX_Customer_Key     NONCLUSTERED INDEX             15,608 
Ix_Date             NONCLUSTERED INDEX             15,561 
PK_MDT_Customer_Order_Debit_Date_Infos_Tmp  CLUSTERED INDEX  436,675 

表结构:

    CREATE TABLE [dbo].[MDT_Customer_Order_Debit_Date_Infos](
        [OrderDebit_SeqID] [bigint] IDENTITY(1,1) NOT NULL,
        [Date_ID] [int] NOT NULL,
        [Dist_Zone_Code] [int] NULL,
        [Branch_Code] [int] NULL,
        [Dist_Area_Code] [int] NULL,
        [Dist_Path_Code] [int] NULL,
        [Sale_Zone_Code] [int] NULL,
        [Region_Code] [int] NULL,
        [Office_Code] [int] NULL,
        [Area_Code] [int] NULL,
        [Path_Code] [int] NULL,
        [Visitor_Code] [int] NULL,
        [Customer_Code] [int] NULL,
        [Customer_Master_Code] [varchar](12) NULL,
        [Order_Office_Code] [int] NOT NULL,
        [Order_No] [varchar](10) NOT NULL,
        [Factor_No] [varchar](10) NULL,
        [Order_Status] [tinyint] NULL,
        [Sub_Order_Type] [int] NULL,
        [Payment_Type] [tinyint] NULL,
        [Order_Type] [tinyint] NULL,
        [Return_Reason_Code] [int] NULL,
        [Order_Price] [numeric](18, 0) NULL,
        [PromotionActual_Price] [numeric](18, 0) NULL,
        [Order_DutyPlusTax] [numeric](18, 0) NULL,
        [ReturnPromotionActual_Price] [numeric](18, 0) NULL,
        [Return_Discount] [numeric](18, 0) NULL,
        [PromotionDiscount_Price] [numeric](18, 0) NULL,
        [Discount] [numeric](18, 0) NULL,
        [Calc_Discount] [numeric](18, 0) NULL,
        [ReturnOrder_Price] [numeric](18, 0) NULL,
        [Return_DutyPlusTax] [numeric](18, 0) NULL,
        [Cash_AvgAge] [numeric](18, 2) NULL,
        [Check_AvgAge] [numeric](18, 2) NULL,
        [Indirect_AvgAge] [numeric](18, 2) NULL,
        [Money_Amount] [numeric](18, 0) NULL,
        [Indirect_Amount] [numeric](18, 0) NULL,
        [Check_Amount] [numeric](18, 0) NULL,
        [ReturnCheck_Amount] [numeric](18, 0) NULL,
        [RetChqSettle_Cash] [numeric](18, 0) NULL,
        [RetChqSettle_Check] [numeric](18, 0) NULL,
        [RemainCheck_Debit] [numeric](18, 0) NULL,
        [Order_Payable] [numeric](18, 0) NULL,
        [Order_Debit] [numeric](18, 0) NULL,
        [OrderRemain_ReturnCheck] [numeric](18, 0) NULL,
        [RealRemain_Debit] [numeric](18, 0) NULL,
        [RealRemain_Check] [numeric](18, 0) NULL,
        [Debit_Age] [numeric](18, 2) NULL,
        [Payment_Age] [numeric](18, 2) NULL,
        [Factor_Date] [int] NULL,
        [Order_Date] [int] NULL,
        [Visit_Date] [int] NULL,
        [Give_Date] [int] NULL,
        [Office_Key] [int] NULL,
        [Customer_Key] [int] NULL,
        [During_Check_Amount] [numeric](18, 0) NULL,
        [Collected_Check_Amount] [numeric](18, 0) NULL,
        [Dist_Branch_Key] [int] NULL,
        [AllCheck_AvgAge] [numeric](18, 2) NULL,
        [Cheque_Age] [int] NULL,
        [Sale_Remain_Debit] [numeric](18, 0) NULL,
        [Dist_Remain_Debit] [numeric](18, 0) NULL,
        [HandMoney_Amount] [numeric](18, 0) NULL,
        [AllCheck_Amount] [numeric](18, 0) NULL,
        [Indirect_Discount_Amount] [numeric](18, 0) NULL,
        [PosMoney_Amount] [numeric](18, 0) NULL,
        [Portfolio_Code] [int] NULL,
        [Portfolio_Set_Code] [int] NULL,
        [Portfolio_Type] [tinyint] NULL,
        [Company_id] [smallint] NULL,
     CONSTRAINT [PK_MDT_Customer_Order_Debit_Date_Infos_Tmp] PRIMARY KEY CLUSTERED 
    (
        [OrderDebit_SeqID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
    ) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [IX_Customer_Key] ON [dbo].[MDT_Customer_Order_Debit_Date_Infos]
(
    [Customer_Key] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO



/****** Object:  Index [IX_CustomerCode]    Script Date: 1/20/2014 6:02:52 PM ******/
CREATE NONCLUSTERED INDEX [IX_CustomerCode] ON [dbo].[MDT_Customer_Order_Debit_Date_Infos]
(
    [Customer_Code] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO


/****** Object:  Index [Ix_Date]    Script Date: 1/20/2014 6:02:59 PM ******/
CREATE NONCLUSTERED INDEX [Ix_Date] ON [dbo].[MDT_Customer_Order_Debit_Date_Infos]
(
    [Date_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO


/****** Object:  Index [PK_MDT_Customer_Order_Debit_Date_Infos_Tmp]    Script Date: 1/20/2014 6:03:07 PM ******/
ALTER TABLE [dbo].[MDT_Customer_Order_Debit_Date_Infos] ADD  CONSTRAINT [PK_MDT_Customer_Order_Debit_Date_Infos_Tmp] PRIMARY KEY CLUSTERED 
(
    [OrderDebit_SeqID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO
index sql-server-2012
  • 2 个回答
  • 1239 Views
Martin Hope
abianari
Asked: 2014-01-04 21:28:49 +0800 CST

在 SSIS 2012 目录中部署的包失败并出现超时错误

  • 2

我在 Visual Studio 2008 中创建了一个 SSIS 包,并使用集成服务目录将其部署到 SQL Server 2012。当我从 BIDS 运行包时,它成功完成。当我安排包使用作业运行时,作业的执行失败(有时是随机的)并显示以下消息:

环境参考 ID:NULL。说明:超时。在操作完成之前超时时间已过或服务器没有响应。来源:.Net SqlClient 数据提供者

我尝试为此步骤添加重试,并且在第二次重试时它工作正常。我不知道原因,这份工作工作了 2 年,没有任何问题。

sql-server-2012 ssis-2012
  • 1 个回答
  • 2982 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目

    • 12 个回答
  • Marko Smith

    如何让sqlplus的输出出现在一行中?

    • 3 个回答
  • Marko Smith

    选择具有最大日期或最晚日期的日期

    • 3 个回答
  • Marko Smith

    如何列出 PostgreSQL 中的所有模式?

    • 4 个回答
  • Marko Smith

    列出指定表的所有列

    • 5 个回答
  • Marko Smith

    如何在不修改我自己的 tnsnames.ora 的情况下使用 sqlplus 连接到位于另一台主机上的 Oracle 数据库

    • 4 个回答
  • Marko Smith

    你如何mysqldump特定的表?

    • 4 个回答
  • Marko Smith

    使用 psql 列出数据库权限

    • 10 个回答
  • Marko Smith

    如何从 PostgreSQL 中的选择查询中将值插入表中?

    • 4 个回答
  • Marko Smith

    如何使用 psql 列出所有数据库和表?

    • 7 个回答
  • Martin Hope
    Jin 连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目 2014-12-02 02:54:58 +0800 CST
  • Martin Hope
    Stéphane 如何列出 PostgreSQL 中的所有模式? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh 为什么事务日志不断增长或空间不足? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland 列出指定表的所有列 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney MySQL 能否合理地对数十亿行执行查询? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx 如何监控大型 .sql 文件的导入进度? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison 你如何mysqldump特定的表? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 对 SQL 查询进行计时? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas 如何从 PostgreSQL 中的选择查询中将值插入表中? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 列出所有数据库和表? 2011-02-18 00:45:49 +0800 CST

热门标签

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve