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
    • 最新
    • 标签
主页 / dba / 问题 / 112856
Accepted
Zoinky
Zoinky
Asked: 2015-09-02 08:14:15 +0800 CST2015-09-02 08:14:15 +0800 CST 2015-09-02 08:14:15 +0800 CST

跨多个子表查询优化的总计(总和/计数)

  • 772

我们的数据库中有 12 种类型的费用,其中一些具有相当不同的数据减去 Amount 字段。我们在应用程序和报告中有多个地方需要单个和多个费用总计以及每个费用类型和总计的计数。最后,我们希望所有这些调用都使用一个视图,但对使用存储过程持开放态度。

为此,我们研究了多种替代方案,发现 CTE 允许我们在不使用临时表的情况下获取所有需要的数据。使用连接不起作用,因为无论我们尝试什么,我们都会看到记录被复制或删除。

我附上了费用表的子集和包含 CTE 的查询。有人有比这更好的选择吗?更快的东西?我们是否适当地接近这种“扁平化”?

请注意,无论是视图还是过程,此查询的执行计划都是相同的,而且过程似乎需要两倍的时间才能运行。

下面是代码

WITH pe AS
(
SELECT 
    EventRegistrationId
    ,sum(AmountPaid)            as AmountPaidTotal
    ,sum(CommercialValueAmount) as CommercialValueAmountTotal
    ,count(1) as ExpenseCount
FROM PettyExpenses 
WHERE IsDisputed = 0 AND IsUndisputed = 0
group by EventRegistrationId
),hpe AS
(
SELECT 
    EventRegistrationId
    ,sum(AmountPaid)            as AmountPaidTotal
    ,sum(CommercialValueAmount) as CommercialValueAmountTotal
    ,count(1) as ExpenseCount
FROM HirePremisesExpenses 
WHERE IsDisputed = 0 AND IsUndisputed = 0
group by EventRegistrationId
), ae AS
(
SELECT 
    EventRegistrationId
    ,sum(AmountPaid)            as AmountPaidTotal
    ,sum(CommercialValueAmount) as CommercialValueAmountTotal
    ,count(1) as ExpenseCount
FROM AdvertisingExpenses 
WHERE IsDisputed = 0 AND IsUndisputed = 0
group by EventRegistrationId
), se AS
(
SELECT 
    EventRegistrationId
    ,sum(AmountPaid)            as AmountPaidTotal
    ,sum(CommercialValueAmount) as CommercialValueAmountTotal
    ,count(1) as ExpenseCount
FROM ServiceExpenses 
WHERE IsDisputed = 0 AND IsUndisputed = 0
group by EventRegistrationId
), gse AS
(
SELECT 
    EventRegistrationId
    ,sum(AmountPaid)            as AmountPaidTotal
    ,sum(CommercialValueAmount) as CommercialValueAmountTotal
    ,count(1) as ExpenseCount
FROM GoodsSuppliedExpenses 
WHERE IsDisputed = 0 AND IsUndisputed = 0
group by EventRegistrationId
), thve AS
(
SELECT 
    EventRegistrationId
    ,sum(AmountPaid)            as AmountPaidTotal
    ,sum(CommercialValueAmount) as CommercialValueAmountTotal
    ,count(1) as ExpenseCount
FROM TravelHireVehicleExpenses 
WHERE IsDisputed = 0 AND 
IsUndisputed = 0
group by EventRegistrationId

)
select
distinct eer.EventRegistrationId
--Petty Expense
,ISNULL(pe.AmountPaidTotal,0) as PettyExpenseAmountPaid
,ISNULL(pe.CommercialValueAmountTotal,0) as PettyExpenseCommercial
,ISNULL(pe.ExpenseCount,0) as PettyExpenseCount
--Hire On Premise Expense
,ISNULL(hpe.AmountPaidTotal,0) as HireOnPremisesExpenseAmountPaid
,ISNULL(hpe.CommercialValueAmountTotal,0) as HireOnPremisesExpenseCommercial
,ISNULL(hpe.ExpenseCount,0) as HireOnPremisesExpenseCount
--Advertising Expense
,ISNULL(ae.AmountPaidTotal,0) as AdvertisingExpenseAmountPaid
,ISNULL(ae.CommercialValueAmountTotal,0) as AdvertisingExpenseCommercial
,ISNULL(ae.ExpenseCount,0) as AdvertisingExpenseExpenseCount
--Services Expense
,ISNULL(se.AmountPaidTotal,0) as ServiceExpenseAmountPaid
,ISNULL(se.CommercialValueAmountTotal,0) as ServiceExpenseCommercial
,ISNULL(se.ExpenseCount,0) as ServiceExpenseExpenseCount
--Goods Supplied Expense
,ISNULL(gse.AmountPaidTotal,0) as GoodsSuppliedExpenseAmountPaid
,ISNULL(gse.CommercialValueAmountTotal,0) as GoodsSuppliedExpenseCommercial
,ISNULL(gse.ExpenseCount,0) as GoodsSuppliedExpenseExpenseCount
--Travel and Vehicle Expense
,ISNULL(thve.AmountPaidTotal,0) as TravelVehicleExpenseAmountPaid
,ISNULL(thve.CommercialValueAmountTotal,0) as TravelVehicleExpenseCommercial
,ISNULL(thve.ExpenseCount,0) as TravelVehicleExpenseExpenseCount
--All Expenses
,ISNULL(pe.AmountPaidTotal,0) 
    + ISNULL(hpe.AmountPaidTotal,0)
    + ISNULL(ae.AmountPaidTotal,0) 
    + ISNULL(se.AmountPaidTotal,0)
    + ISNULL(gse.AmountPaidTotal,0) 
    + ISNULL(thve.AmountPaidTotal,0) as AllExpenseAmountPaidTotal
,ISNULL(pe.CommercialValueAmountTotal,0) 
    + ISNULL(hpe.CommercialValueAmountTotal,0)
    + ISNULL(ae.CommercialValueAmountTotal,0) 
    + ISNULL(se.CommercialValueAmountTotal,0)
    + ISNULL(gse.CommercialValueAmountTotal,0) 
    + ISNULL(thve.CommercialValueAmountTotal,0) as AllExpenseCommercialValueTotal
,ISNULL(pe.ExpenseCount,0) 
    + ISNULL(hpe.ExpenseCount,0)
    + ISNULL(ae.ExpenseCount,0) 
    + ISNULL(se.ExpenseCount,0)
    + ISNULL(gse.ExpenseCount,0) 
    + ISNULL(thve.ExpenseCount,0) as AllExpenseCount
from EventRegistrations eer
left join pe on pe.EventRegistrationId = eer.EventRegistrationId
left join hpe on hpe.EventRegistrationId = eer.EventRegistrationId
left join ae on ae.EventRegistrationId = eer.EventRegistrationId 
left join se on se.EventRegistrationId = eer.EventRegistrationId
left join gse on gse.EventRegistrationId = eer.EventRegistrationId
left join thve on thve.EventRegistrationId = eer.EventRegistrationId

更新:

这是带有插入内容的数据库模式,供那些有兴趣观看它的人使用。

数据库架构和插入

使用 SQL Server 2014 Standard,我将 db schema/inserts 更改为一个文件(此处为大文件),其中包含更多插入内容以及上传的执行计划和结果(2 个图像并排显示所有返回的列)

执行计划

结果 1

结果继续

sql-server sql-server-2014
  • 3 3 个回答
  • 216 Views

3 个回答

  • Voted
  1. spaghettidba
    2015-09-02T15:16:54+08:002015-09-02T15:16:54+08:00

    我用大量数据填充了数据库,并做了一些有趣的发现。

    使用这些过滤索引在我的系统中返回结果大约需要 7 秒,而使用 Kin 建议的非过滤索引需要超过 1 分钟。

    create nonclustered index [fnc_PettyExpenses] on [dbo].[PettyExpenses] (
            EventRegistrationId
        ) include (
         AmountPaid
        ,CommercialValueAmount
        )
    WHERE [IsDisputed] = 0 AND [IsUndisputed] = 0;
    go
    
    create nonclustered index [fnc_HirePremisesExpenses] on [dbo].[HirePremisesExpenses] (
            EventRegistrationId
        ) include (
        AmountPaid
        ,CommercialValueAmount
        )
    WHERE [IsDisputed] = 0 AND [IsUndisputed] = 0;
    go
    
    create nonclustered index [fnc_AdvertisingExpenses] on [dbo].[AdvertisingExpenses] (
            EventRegistrationId
        ) include (
         AmountPaid
        ,CommercialValueAmount
        )
    WHERE [IsDisputed] = 0 AND [IsUndisputed] = 0;
    go
    
    create nonclustered index [fnc_ServiceExpenses] on [dbo].[ServiceExpenses] (
            EventRegistrationId
        ) include (
        AmountPaid
        ,CommercialValueAmount
        )
    WHERE [IsDisputed] = 0 AND [IsUndisputed] = 0;
    go
    
    create nonclustered index [fnc_GoodsSuppliedExpenses] on [dbo].[GoodsSuppliedExpenses] (
            EventRegistrationId
        ) include (
         AmountPaid
        ,CommercialValueAmount
        )
    WHERE [IsDisputed] = 0 AND [IsUndisputed] = 0;
    go
    
    create nonclustered index [fnc_TravelHireVehicleExpenses] on [dbo].[TravelHireVehicleExpenses] (
            EventRegistrationId
        ) include (
         AmountPaid
        ,CommercialValueAmount
        )
    WHERE [IsDisputed] = 0 AND [IsUndisputed] = 0;
    go
    

    加上 Kin 推荐的索引(你可能已经有了,因为它似乎是表的主键):

    create nonclustered index [nc_EventRegistrations] on dbo.EventRegistrations (EventRegistrationId);
    

    事实证明,就流逝的时间而言,不存在明显的赢家。

    您的查询形式使用MERGE JOINs 获得了一个非常好的并行计划。

    并行计划

    使用UNION ALLs 的查询得到一个更简单的串行计划。

    系列计划

    就 IO 统计而言,串行计划似乎比并行计划更有效:

    并行计划 IO 统计信息 并行计划 IO 统计信息

    串行计划 IO 统计信息 串行计划 IO 统计信息

    经过的时间非常相似,但并行计划的 CPU 时间更高。

    请记住,过滤索引有一些限制,因此它们可能不是您的最佳选择。

    • 3
  2. Erik
    2015-09-02T09:13:35+08:002015-09-02T09:13:35+08:00

    根据您的需要,答案可能是将CTE示例中的每个转换为索引视图。这将以增加存储空间和稍微慢一点的 CRUD 操作为代价,节省每个查询的聚合。基本格式类似于:

    CREATE VIEW dbo.AggregatedPettyExpenses 
        WITH SCHEMABINDING AS
        SELECT 
            EventRegistrationId
            ,SUM(AmountPaid)            as AmountPaidTotal
            ,SUM(CommercialValueAmount) as CommercialValueAmountTotal
            ,SUM(CASE WHEN AmountPaid IS NOT NULL THEN 1 ELSE 0 END) as ExpenseCount -- Hack for your count logic
            ,COUNT_BIG(*) AS COUNT
        FROM PettyExpenses 
        WHERE IsDisputed = 0 AND IsUndisputed = 0
        GROUP BY EventRegistrationId
    
        CREATE UNIQUE CLUSTERED INDEX [IDX_dbo_AggregatedPettyExpenses_EventRegistrationId] 
            ON dbo.AggregatedPettyExpenses(EventRegistrationId);
    

    对每个 重复上面相同的模式CTE。然后你会VIEW在你的例子中有一个 like 但你LEFT JOIN到 newINDEXED VIEW的而不是CTE的。

    由于您提到您正在使用标准版,因此值得知道如果您希望索引视图的行为类似于索引视图而不是普通视图,则必须使用查询提示。WITH (NOEXPAND)顺便说一下,目前 Azure Sql Server 数据库也是如此。

    • 2
  3. Best Answer
    Kin Shah
    2015-09-02T12:59:04+08:002015-09-02T12:59:04+08:00

    有人有比这更好的选择吗?更快的东西?

    您的原始查询将对所有 6 个表进行表扫描。

    您可以删除distinct eer.EventRegistrationId并使用GROUP BY eer.EventRegistrationId,其余一切保持不变。

    以下索引将帮助您避免TABLE SCAN并会执行以下操作INDEX SEEK:

    create nonclustered index [nc_PettyExpenses] on [dbo].[PettyExpenses] (
        [IsDisputed]
        ,[IsUndisputed]
        ) include (
        EventRegistrationId
        ,AmountPaid
        ,CommercialValueAmount
        )
    go
    
    create nonclustered index [nc_HirePremisesExpenses] on [dbo].[HirePremisesExpenses] (
        [IsDisputed]
        ,[IsUndisputed]
        ) include (
        EventRegistrationId
        ,AmountPaid
        ,CommercialValueAmount
        )
    go
    
    create nonclustered index [nc_AdvertisingExpenses] on [dbo].[AdvertisingExpenses] (
        [IsDisputed]
        ,[IsUndisputed]
        ) include (
        EventRegistrationId
        ,AmountPaid
        ,CommercialValueAmount
        )
    go
    
    create nonclustered index [nc_ServiceExpenses] on [dbo].[ServiceExpenses] (
        [IsDisputed]
        ,[IsUndisputed]
        ) include (
        EventRegistrationId
        ,AmountPaid
        ,CommercialValueAmount
        )
    go
    
    create nonclustered index [nc_GoodsSuppliedExpenses] on [dbo].[GoodsSuppliedExpenses] (
        [IsDisputed]
        ,[IsUndisputed]
        ) include (
        EventRegistrationId
        ,AmountPaid
        ,CommercialValueAmount
        )
    go
    
    create nonclustered index [nc_TravelHireVehicleExpenses] on [dbo].[TravelHireVehicleExpenses] (
        [IsDisputed]
        ,[IsUndisputed]
        ) include (
        EventRegistrationId
        ,AmountPaid
        ,CommercialValueAmount
        )
    go
    
    create nonclustered index [nc_EventRegistrations] on dbo.EventRegistrations (EventRegistrationId);
    

    WITH OPTION (MAXDOP 1)+ 以上索引

    查询计划

    在此处输入图像描述

    统计IO输出

    在此处输入图像描述


    没有OPTION (MAXDOP 1)+ 以上索引

    查询计划:

    在此处输入图像描述

    统计IO输出

    在此处输入图像描述

    ╔═════════════════════════════════╦═════╦═════════════╗
    ║             Option              ║ CPU ║ ElapsedTime ║
    ╠═════════════════════════════════╬═════╬═════════════╣
    ║ Plain - As you posted your code ║  16 ║          12 ║
    ║ Without MAXDOP 1 + Indexes      ║  62 ║          11 ║
    ║ With MAXDOP 1 + Indexes         ║   0 ║           7 ║ <== Winner !!
    ╚═════════════════════════════════╩═════╩═════════════╝
    

    以下是完整性代码:

    /*
    dbcc freeproccache
    dbcc dropcleanbuffers
    
    */
    set nocount on
    set statistics io on
    set statistics time on;
    
    with pe
    as (
        select EventRegistrationId
            ,sum(AmountPaid) as AmountPaidTotal
            ,sum(CommercialValueAmount) as CommercialValueAmountTotal
            ,count(1) as ExpenseCount
        from PettyExpenses
        where IsDisputed = 0
            and IsUndisputed = 0
        group by EventRegistrationId
        )
        ,hpe
    as (
        select EventRegistrationId
            ,sum(AmountPaid) as AmountPaidTotal
            ,sum(CommercialValueAmount) as CommercialValueAmountTotal
            ,count(1) as ExpenseCount
        from HirePremisesExpenses
        where IsDisputed = 0
            and IsUndisputed = 0
        group by EventRegistrationId
        )
        ,ae
    as (
        select EventRegistrationId
            ,sum(AmountPaid) as AmountPaidTotal
            ,sum(CommercialValueAmount) as CommercialValueAmountTotal
            ,count(1) as ExpenseCount
        from AdvertisingExpenses
        where IsDisputed = 0
            and IsUndisputed = 0
        group by EventRegistrationId
        )
        ,se
    as (
        select EventRegistrationId
            ,sum(AmountPaid) as AmountPaidTotal
            ,sum(CommercialValueAmount) as CommercialValueAmountTotal
            ,count(1) as ExpenseCount
        from ServiceExpenses
        where IsDisputed = 0
            and IsUndisputed = 0
        group by EventRegistrationId
        )
        ,gse
    as (
        select EventRegistrationId
            ,sum(AmountPaid) as AmountPaidTotal
            ,sum(CommercialValueAmount) as CommercialValueAmountTotal
            ,count(1) as ExpenseCount
        from GoodsSuppliedExpenses
        where IsDisputed = 0
            and IsUndisputed = 0
        group by EventRegistrationId
        )
        ,thve
    as (
        select EventRegistrationId
            ,sum(AmountPaid) as AmountPaidTotal
            ,sum(CommercialValueAmount) as CommercialValueAmountTotal
            ,count(1) as ExpenseCount
        from TravelHireVehicleExpenses
        where IsDisputed = 0
            and IsUndisputed = 0
        group by EventRegistrationId
        )
    select eer.EventRegistrationId
        --Petty Expense
        ,ISNULL(SUM(case e.src
                    when 'pe'
                        then e.AmountPaidTotal
                    end), 0) as PettyExpenseAmountPaid
        ,ISNULL(SUM(case e.src
                    when 'pe'
                        then e.CommercialValueAmountTotal
                    end), 0) as PettyExpenseCommercial
        ,ISNULL(SUM(case e.src
                    when 'pe'
                        then e.ExpenseCount
                    end), 0) as PettyExpenseCount
        --Hire On Premise Expense
        ,ISNULL(SUM(case e.src
                    when 'hpe'
                        then e.AmountPaidTotal
                    end), 0) as HireOnPremisesExpenseAmountPaid
        ,ISNULL(SUM(case e.src
                    when 'hpe'
                        then e.CommercialValueAmountTotal
                    end), 0) as HireOnPremisesExpenseCommercial
        ,ISNULL(SUM(case e.src
                    when 'hpe'
                        then e.ExpenseCount
                    end), 0) as HireOnPremisesExpenseCount
        --Advertising Expense
        ,ISNULL(SUM(case e.src
                    when 'ae'
                        then e.AmountPaidTotal
                    end), 0) as AdvertisingExpenseAmountPaid
        ,ISNULL(SUM(case e.src
                    when 'ae'
                        then e.CommercialValueAmountTotal
                    end), 0) as AdvertisingExpenseCommercial
        ,ISNULL(SUM(case e.src
                    when 'ae'
                        then e.ExpenseCount
                    end), 0) as AdvertisingExpenseExpenseCount
        --Services Expense
        ,ISNULL(SUM(case e.src
                    when 'se'
                        then e.AmountPaidTotal
                    end), 0) as ServiceExpenseAmountPaid
        ,ISNULL(SUM(case e.src
                    when 'se'
                        then e.CommercialValueAmountTotal
                    end), 0) as ServiceExpenseCommercial
        ,ISNULL(SUM(case e.src
                    when 'se'
                        then e.ExpenseCount
                    end), 0) as ServiceExpenseExpenseCount
        --Goods Supplied Expense
        ,ISNULL(SUM(case e.src
                    when 'gse'
                        then e.AmountPaidTotal
                    end), 0) as GoodsSuppliedExpenseAmountPaid
        ,ISNULL(SUM(case e.src
                    when 'gse'
                        then e.CommercialValueAmountTotal
                    end), 0) as GoodsSuppliedExpenseCommercial
        ,ISNULL(SUM(case e.src
                    when 'gse'
                        then e.ExpenseCount
                    end), 0) as GoodsSuppliedExpenseExpenseCount
        --Travel and Vehicle Expense
        ,ISNULL(SUM(case e.src
                    when 'thve'
                        then e.AmountPaidTotal
                    end), 0) as TravelVehicleExpenseAmountPaid
        ,ISNULL(SUM(case e.src
                    when 'thve'
                        then e.CommercialValueAmountTotal
                    end), 0) as TravelVehicleExpenseCommercial
        ,ISNULL(SUM(case e.src
                    when 'thve'
                        then e.ExpenseCount
                    end), 0) as TravelVehicleExpenseExpenseCount
        --All Expenses
        ,ISNULL(SUM(e.AmountPaidTotal), 0) as AllExpenseAmountPaidTotal
        ,ISNULL(SUM(e.CommercialValueAmountTotal), 0) as AllExpenseCommercialValueTotal
        ,ISNULL(SUM(e.ExpenseCount), 0) as AllExpenseCount
    from EventRegistrations eer
    left join (
        select 'pe' as src
            ,EventRegistrationId
            ,AmountPaidTotal
            ,CommercialValueAmountTotal
            ,ExpenseCount
        from pe
    
        union all
    
        select 'hpe' as src
            ,EventRegistrationId
            ,AmountPaidTotal
            ,CommercialValueAmountTotal
            ,ExpenseCount
        from hpe
    
        union all
    
        select 'ae' as src
            ,EventRegistrationId
            ,AmountPaidTotal
            ,CommercialValueAmountTotal
            ,ExpenseCount
        from ae
    
        union all
    
        select 'se' as src
            ,EventRegistrationId
            ,AmountPaidTotal
            ,CommercialValueAmountTotal
            ,ExpenseCount
        from se
    
        union all
    
        select 'gse' as src
            ,EventRegistrationId
            ,AmountPaidTotal
            ,CommercialValueAmountTotal
            ,ExpenseCount
        from gse
    
        union all
    
        select 'thve' as src
            ,EventRegistrationId
            ,AmountPaidTotal
            ,CommercialValueAmountTotal
            ,ExpenseCount
        from thve
        ) as e on eer.EventRegistrationId = e.EventRegistrationId
    group by eer.EventRegistrationId --- we removed the distinct and added a group by clause 
    option (maxdop 1)
    
    set statistics io off
    set statistics time off
    

    注意:您可以伪造行数和页数 <-- 仅出于教育原因

    UPDATE STATISTICS [dbo].[PettyExpenses]             WITH ROWCOUNT = 10000000, pagecount = 10000000
    UPDATE STATISTICS [dbo].[HirePremisesExpenses]      WITH ROWCOUNT = 10000000, pagecount = 10000000
    UPDATE STATISTICS [dbo].[AdvertisingExpenses]       WITH ROWCOUNT = 10000000, pagecount = 10000000
    UPDATE STATISTICS [dbo].[ServiceExpenses]           WITH ROWCOUNT = 10000000, pagecount = 10000000
    UPDATE STATISTICS [dbo].[GoodsSuppliedExpenses]     WITH ROWCOUNT = 10000000, pagecount = 10000000
    UPDATE STATISTICS [dbo].[TravelHireVehicleExpenses] WITH ROWCOUNT = 10000000, pagecount = 10000000
    
    • 2

相关问题

  • SQL Server - 使用聚集索引时如何存储数据页

  • 我需要为每种类型的查询使用单独的索引,还是一个多列索引可以工作?

  • 什么时候应该使用唯一约束而不是唯一索引?

  • 死锁的主要原因是什么,可以预防吗?

  • 如何确定是否需要或需要索引

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