iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >怎么理解PostgreSQL的分区表
  • 935
分享到

怎么理解PostgreSQL的分区表

2024-04-02 19:04:59 935人浏览 安东尼
摘要

本篇内容主要讲解“怎么理解postgresql的分区表”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“怎么理解Postgresql的分区表”吧!在PG中,分区表通

本篇内容主要讲解“怎么理解postgresql的分区表”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“怎么理解Postgresql的分区表”吧!

在PG中,分区表通过"继承"的方式实现,这里就会存在一个问题,就是在插入数据时,PG如何确定数据应该插入到哪个目标分区?在PG中,通过函数ExecPrepareTupleRouting为路由待插入的元组做准备,主要的目的是确定元组所在的分区。

一、数据结构

ModifyTable
ModifyTable node
通过插入、更新或删除,将子计划生成的行应用到结果表。


typedef struct ModifyTable
{
    Plan        plan;
    CmdType     operation;      
    bool        canSetTag;      
    Index       nominalRelation;    
    Index       rootRelation;   
    bool        partColsUpdated;    
    List       *resultRelations;    
    int         resultRelIndex; 
    int         rootResultRelIndex; 
    List       *plans;          
    List       *withCheckOptionLists;   
    List       *returningLists; 
    List       *fdwPrivLists;   
    Bitmapset  *fdwDirectModifyPlans;   
    List       *rowMarks;       
    int         epqParam;       
    OnConflictAction onConflictAction;  
    List       *arbiterIndexes; 
    List       *onConflictSet;  
    Node       *onConflictWhere;    
    Index       exclRelRTI;     
    List       *exclRelTlist;   
} ModifyTable;

ResultRelInfo
ResultRelInfo结构体
每当更新一个现有的关系时,我们必须更新关系上的索引,也许还需要触发触发器。ResultRelInfo保存关于结果关系所需的所有信息,包括索引。


typedef struct ResultRelInfo
{
    NodeTag     type;

    
    //RTE索引
    Index       ri_RangeTableIndex;

    
    //结果/目标relation的描述符
    Relation    ri_RelationDesc;

    
    //目标关系中索引数目
    int         ri_NumIndices;

    
    //索引的关系描述符数组(索引视为一个relation)
    RelationPtr ri_IndexRelationDescs;

    
    //索引的键/属性数组
    IndexInfo **ri_IndexRelationInfo;

    
    //触发的索引
    TriggerDesc *ri_TrigDesc;

    
    //触发器函数(缓存)
    FmgrInfo   *ri_TrigFunctions;

    
    //WHEN表达式状态的触发器数组
    ExprState **ri_TrigWhenExprs;

    
    //可选的触发器运行期度量器
    Instrumentation *ri_TrigInstrument;

    
    //FDW回调函数
    struct FdwRoutine *ri_FdwRoutine;

    
    //可用于存储FDW的私有状态
    void       *ri_FdwState;

    
    //直接更新FDW时为T
    bool        ri_usesFdwDirectModify;

    
    //WithCheckOption链表
    List       *ri_WithCheckOptions;

    
    //WithCheckOption表达式链表
    List       *ri_WithCheckOptionExprs;

    
    //约束检查表达式状态数组
    ExprState **ri_ConstraintExprs;

    
    //用于从元组中删除junk属性
    JunkFilter *ri_junkFilter;

    
    //RETURNING表达式链表
    List       *ri_returningList;

    
    //用于计算RETURNING链表
    ProjectionInfo *ri_projectReturning;

    
    //用于检查冲突的仲裁器索引的列表
    List       *ri_onConflictArbiterIndexes;

    
    //ON CONFLICT解析状态
    OnConflictSetState *ri_onConflict;

    
    //分区检查表达式链表
    List       *ri_PartitionCheck;

    
    //分区检查表达式状态
    ExprState  *ri_PartitionCheckExpr;

    
    //分区root根表描述符
    Relation    ri_PartitionRoot;

    
    //额外的分区元组路由信息
    struct PartitionRoutingInfo *ri_PartitionInfo;
} ResultRelInfo;

PartitionRoutingInfo
PartitionRoutingInfo结构体
分区路由信息,用于将元组路由到表分区的结果关系信息。


typedef struct PartitionRoutingInfo
{
    
    TupleConversionMap *pi_RootToPartitionMap;

    
    TupleConversionMap *pi_PartitionToRootMap;

    
    TupleTableSlot *pi_PartitionTupleSlot;
} PartitionRoutingInfo;

TupleConversionMap
TupleConversionMap结构体,用于存储元组转换映射信息.

typedef struct TupleConversionMap
{
    TupleDesc   indesc;         
    TupleDesc   outdesc;        
    AttrNumber *attrMap;        
    Datum      *invalues;       
    bool       *inisnull;       //是否为NULL标记数组
    Datum      *outvalues;      
    bool       *outisnull;      //null标记
} TupleConversionMap;

二、源码解读

ExecPrepareTupleRouting函数确定要插入slot中的tuple所属的分区,同时修改mtstate和estate等相关信息,为后续实际的插入作准备。


static TupleTableSlot *
ExecPrepareTupleRouting(ModifyTableState *mtstate,
                        EState *estate,
                        PartitionTupleRouting *proute,
                        ResultRelInfo *targetRelInfo,
                        TupleTableSlot *slot)
{
    ModifyTable *node;//ModifyTable节点
    int         partidx;//分区索引
    ResultRelInfo *partrel;//ResultRelInfo结构体指针(数组)
    HeapTuple   tuple;//元组

    
    partidx = ExecFindPartition(targetRelInfo,
                                proute->partition_dispatch_info,
                                slot,
                                estate);
    Assert(partidx >= 0 && partidx < proute->num_partitions);

    
    partrel = proute->partitions[partidx];
    if (partrel == NULL)
        partrel = ExecInitPartitionInfo(mtstate, targetRelInfo,
                                        proute, estate,
                                        partidx);

    
    if (!partrel->ri_PartitionReadyForRouting)
    {
        
        //验证分区是否可用于INSERT
        CheckValidResultRel(partrel, CMD_INSERT);

        
        //设置将元组路由到分区所需的信息。
        ExecInitRoutingInfo(mtstate, estate, proute, partrel, partidx);
    }

    
    estate->es_result_relation_info = partrel;

    
    //从给定的slot中获取heap tuple
    tuple = ExecMaterializeSlot(slot);

    
    if (mtstate->mt_transition_capture != NULL)
    {
        if (partrel->ri_TrigDesc &&
            partrel->ri_TrigDesc->trig_insert_before_row)
        {
            
            mtstate->mt_transition_capture->tcs_original_insert_tuple = NULL;
            mtstate->mt_transition_capture->tcs_map =
                TupConvMapForLeaf(proute, targetRelInfo, partidx);
        }
        else
        {
            
            mtstate->mt_transition_capture->tcs_original_insert_tuple = tuple;
            mtstate->mt_transition_capture->tcs_map = NULL;
        }
    }
    if (mtstate->mt_oc_transition_capture != NULL)
    {
        mtstate->mt_oc_transition_capture->tcs_map =
            TupConvMapForLeaf(proute, targetRelInfo, partidx);
    }

    
    ConvertPartitionTupleSlot(proute->parent_child_tupconv_maps[partidx],
                              tuple,
                              proute->partition_tuple_slot,
                              &slot);

    
    //如为ON CONFLICT DO UPDATE模式,则初始化相关信息
    Assert(mtstate != NULL);
    node = (ModifyTable *) mtstate->ps.plan;
    if (node->onConflictAction == ONCONFLICT_UPDATE)
    {
        Assert(mtstate->mt_existing != NULL);
        ExecSetSlotDescriptor(mtstate->mt_existing,
                              RelationGetDescr(partrel->ri_RelationDesc));
        Assert(mtstate->mt_conflproj != NULL);
        ExecSetSlotDescriptor(mtstate->mt_conflproj,
                              partrel->ri_onConflict->oc_ProjTupdesc);
    }

    return slot;
}


HeapTuple
ExecFetchSlotHeapTuple(TupleTableSlot *slot, bool materialize, bool *shouldFree)
{
    
    Assert(slot != NULL);
    Assert(!TTS_EMPTY(slot));

    
    //物化元组,以便slot“拥有”它(如要求)。
    if (materialize)
        slot->tts_ops->materialize(slot);

    if (slot->tts_ops->get_heap_tuple == NULL)
    {
        if (shouldFree)
            *shouldFree = true;
        return slot->tts_ops->copy_heap_tuple(slot);//返回slot拷贝
    }
    else
    {
        if (shouldFree)
            *shouldFree = false;
        return slot->tts_ops->get_heap_tuple(slot);//直接返回slot
    }
}

三、跟踪分析

测试脚本如下

-- Hash Partition
drop table if exists t_hash_partition;
create table t_hash_partition (c1 int not null,c2  varchar(40),c3 varchar(40)) partition by hash(c1);
create table t_hash_partition_1 partition of t_hash_partition for values with (modulus 6,remainder 0);
create table t_hash_partition_2 partition of t_hash_partition for values with (modulus 6,remainder 1);
create table t_hash_partition_3 partition of t_hash_partition for values with (modulus 6,remainder 2);
create table t_hash_partition_4 partition of t_hash_partition for values with (modulus 6,remainder 3);
create table t_hash_partition_5 partition of t_hash_partition for values with (modulus 6,remainder 4);
create table t_hash_partition_6 partition of t_hash_partition for values with (modulus 6,remainder 5);

-- delete from t_hash_partition where c1 = 0;
insert into t_hash_partition(c1,c2,c3) VALUES(0,'HASH0','HAHS0');

启动gdb,设置断点,进入ExecPrepareTupleRouting

(gdb) b ExecPrepareTupleRouting
Breakpoint 1 at 0x710b1e: file nodeModifyTable.c, line 1712.
(gdb) c
Continuing.

Breakpoint 1, ExecPrepareTupleRouting (mtstate=0x1e4de60, estate=0x1e4daf8, proute=0x1e4eb48, targetRelInfo=0x1e4dd48, 
    slot=0x1e4e4e0) at nodeModifyTable.c:1712
1712        partidx = ExecFindPartition(targetRelInfo,

查看函数调用栈
ExecPrepareTupleRouting在ExecModifyTable Node中被调用,为后续的插入作准备.

(gdb) bt
#0  ExecPrepareTupleRouting (mtstate=0x1e4de60, estate=0x1e4daf8, proute=0x1e4eb48, targetRelInfo=0x1e4dd48, slot=0x1e4e4e0)
    at nodeModifyTable.c:1712
#1  0x0000000000711602 in ExecModifyTable (pstate=0x1e4de60) at nodeModifyTable.c:2157
#2  0x00000000006e4c30 in ExecProcNodeFirst (node=0x1e4de60) at execProcnode.c:445
#3  0x00000000006d9974 in ExecProcNode (node=0x1e4de60) at ../../../src/include/executor/executor.h:237
#4  0x00000000006dc22d in ExecutePlan (estate=0x1e4daf8, planstate=0x1e4de60, use_parallel_mode=false, 
    operation=CMD_INSERT, sendTuples=false, numberTuples=0, direction=ForwardScanDirection, dest=0x1e67e90, 
    execute_once=true) at execMain.c:1723
#5  0x00000000006d9f5c in standard_ExecutorRun (queryDesc=0x1e39d68, direction=ForwardScanDirection, count=0, 
    execute_once=true) at execMain.c:364
#6  0x00000000006d9d7f in ExecutorRun (queryDesc=0x1e39d68, direction=ForwardScanDirection, count=0, execute_once=true)
    at execMain.c:307
#7  0x00000000008cbdb3 in ProcessQuery (plan=0x1e67d18, 
    sourceText=0x1d60ec8 "insert into t_hash_partition(c1,c2,c3) VALUES(0,'HASH0','HAHS0');", params=0x0, queryEnv=0x0, 
    dest=0x1e67e90, completionTag=0x7ffdcf148b20 "") at pquery.c:161
#8  0x00000000008cd6f9 in PortalRunMulti (portal=0x1dc6538, isTopLevel=true, setHoldSnapshot=false, dest=0x1e67e90, 
    altdest=0x1e67e90, completionTag=0x7ffdcf148b20 "") at pquery.c:1286
#9  0x00000000008cccb9 in PortalRun (portal=0x1dc6538, count=9223372036854775807, isTopLevel=true, run_once=true, 
    dest=0x1e67e90, altdest=0x1e67e90, completionTag=0x7ffdcf148b20 "") at pquery.c:799
#10 0x00000000008c6b1e in exec_simple_query (
    query_string=0x1d60ec8 "insert into t_hash_partition(c1,c2,c3) VALUES(0,'HASH0','HAHS0');") at postgres.c:1145
#11 0x00000000008cae70 in PostgresMain (arGC=1, argv=0x1d8aba8, dbname=0x1d8aa10 "testdb", username=0x1d5dba8 "xdb")
    at postgres.c:4182

找到该元组所在的分区

(gdb) n
1716        Assert(partidx >= 0 && partidx < proute->num_partitions);
(gdb) p partidx
$1 = 2

获取与所选分区对应的ResultRelInfo;如果还没有,则初始化

(gdb) n
1722        partrel = proute->partitions[partidx];
(gdb) 
1723        if (partrel == NULL)
(gdb) p *partrel
Cannot access memory at address 0x0
(gdb) n
1724            partrel = ExecInitPartitionInfo(mtstate, targetRelInfo,

初始化后的partrel

(gdb) p *partrel
$2 = {type = T_ResultRelInfo, ri_RangeTableIndex = 1, ri_RelationDesc = 0x1e7c940, ri_NumIndices = 0, 
  ri_IndexRelationDescs = 0x0, ri_IndexRelationInfo = 0x0, ri_TrigDesc = 0x0, ri_TrigFunctions = 0x0, 
  ri_TrigWhenExprs = 0x0, ri_TrigInstrument = 0x0, ri_FdwRoutine = 0x0, ri_FdwState = 0x0, ri_usesFdwDirectModify = false, 
  ri_WithCheckOptions = 0x0, ri_WithCheckOptionExprs = 0x0, ri_ConstraintExprs = 0x0, ri_junkFilter = 0x0, 
  ri_returningList = 0x0, ri_projectReturning = 0x0, ri_onConflictArbiterIndexes = 0x0, ri_onConflict = 0x0, 
  ri_PartitionCheck = 0x1e4f538, ri_PartitionCheckExpr = 0x0, ri_PartitionRoot = 0x1e7c2f8, 
  ri_PartitionReadyForRouting = true}

目标分区描述符-->t_hash_partition_3

(gdb) p *partrel->ri_RelationDesc
$3 = {rd_node = {spcNode = 1663, dbNode = 16402, relNode = 16995}, rd_smgr = 0x1e34510, rd_refcnt = 1, rd_backend = -1, 
  rd_islocaltemp = false, rd_isnailed = false, rd_isvalid = true, rd_indexvalid = 0 '\000', rd_statvalid = false, 
  rd_createSubid = 0, rd_newRelfilenodeSubid = 0, rd_rel = 0x1e7c1e0, rd_att = 0x1e7cb58, rd_id = 16995, rd_lockInfo = {
    lockRelId = {relId = 16995, dbId = 16402}}, rd_rules = 0x0, rd_rulescxt = 0x0, trigdesc = 0x0, rd_rsdesc = 0x0, 
  rd_fkeylist = 0x0, rd_fkeyvalid = false, rd_parTKEycxt = 0x0, rd_partkey = 0x0, rd_pdcxt = 0x0, rd_partdesc = 0x0, 
  rd_partcheck = 0x1e7aa30, rd_indexlist = 0x0, rd_oidindex = 0, rd_pkindex = 0, rd_replidindex = 0, rd_statlist = 0x0, 
  rd_indexattr = 0x0, rd_projindexattr = 0x0, rd_keyattr = 0x0, rd_pkattr = 0x0, rd_idattr = 0x0, rd_projidx = 0x0, 
  rd_pubactions = 0x0, rd_options = 0x0, rd_index = 0x0, rd_indextuple = 0x0, rd_amhandler = 0, rd_indexcxt = 0x0, 
  rd_amroutine = 0x0, rd_opfamily = 0x0, rd_opcintype = 0x0, rd_support = 0x0, rd_supportinfo = 0x0, rd_indoption = 0x0, 
  rd_indexprs = 0x0, rd_indpred = 0x0, rd_exclops = 0x0, rd_exclprocs = 0x0, rd_exclstrats = 0x0, rd_amcache = 0x0, 
  rd_indcollation = 0x0, rd_fdwroutine = 0x0, rd_toastoid = 0, pgstat_info = 0x1de40b0}
------------------
testdb=# select oid,relname from pg_class where oid=16995;
  oid  |      relname       
-------+--------------------
 16995 | t_hash_partition_3
(1 row)  
-----------------

该分区是可路由的

(gdb) p partrel->ri_PartitionReadyForRouting
$4 = true

设置estate变量(让它看起来像是插入到分区中)/物化tuple

(gdb) n
1751        estate->es_result_relation_info = partrel;
(gdb) 
1754        tuple = ExecMaterializeSlot(slot);
(gdb) 
1760        if (mtstate->mt_transition_capture != NULL)
(gdb) p tuple
$5 = (HeapTuple) 0x1e4f4e0
(gdb) p *tuple
$6 = {t_len = 40, t_self = {ip_blkid = {bi_hi = 65535, bi_lo = 65535}, ip_posid = 0}, t_tableOid = 0, t_data = 0x1e4f4f8}
(gdb) 
(gdb) p *tuple->t_data
$7 = {t_choice = {t_heap = {t_xmin = 160, t_xmax = 4294967295, t_field3 = {t_cid = 2249, t_xvac = 2249}}, t_datum = {
      datum_len_ = 160, datum_typmod = -1, datum_typeid = 2249}}, t_ctid = {ip_blkid = {bi_hi = 65535, bi_lo = 65535}, 
    ip_posid = 0}, t_infomask2 = 3, t_infomask = 2, t_hoff = 24 '\030', t_bits = 0x1e4f50f ""}

mtstate->mt_transition_capture 为NULL,无需处理相关信息

(gdb) p mtstate->mt_transition_capture 
$8 = (struct TransitionCaptureState *) 0x0
1783        if (mtstate->mt_oc_transition_capture != NULL)
(gdb)

如需要,转换元组

1792        ConvertPartitionTupleSlot(proute->parent_child_tupconv_maps[partidx],
(gdb) 
1798        Assert(mtstate != NULL);
(gdb) 
1799        node = (ModifyTable *) mtstate->ps.plan;
(gdb) p *mtstate
$9 = {ps = {type = T_ModifyTableState, plan = 0x1e59838, state = 0x1e4daf8, ExecProcNode = 0x711056 <ExecModifyTable>, 
    ExecProcNodeReal = 0x711056 <ExecModifyTable>, instrument = 0x0, worker_instrument = 0x0, worker_jit_instrument = 0x0, 
    qual = 0x0, lefttree = 0x0, righttree = 0x0, initPlan = 0x0, subPlan = 0x0, chgParam = 0x0, 
    ps_ResultTupleSlot = 0x1e4ede8, ps_ExprContext = 0x0, ps_ProjInfo = 0x0, scandesc = 0x0}, operation = CMD_INSERT, 
  canSetTag = true, mt_done = false, mt_plans = 0x1e4e078, mt_nplans = 1, mt_whichplan = 0, resultRelInfo = 0x1e4dd48, 
  rootResultRelInfo = 0x0, mt_arowmarks = 0x1e4e098, mt_epqstate = {estate = 0x0, planstate = 0x0, origslot = 0x1e4e4e0, 
    plan = 0x1e59588, arowMarks = 0x0, epqParam = 0}, fireBSTriggers = false, mt_existing = 0x0, mt_excludedtlist = 0x0, 
  mt_conflproj = 0x0, mt_partition_tuple_routing = 0x1e4eb48, mt_transition_capture = 0x0, mt_oc_transition_capture = 0x0, 
  mt_per_subplan_tupconv_maps = 0x0}

返回slot,完成调用

(gdb) n
1800        if (node->onConflictAction == ONCONFLICT_UPDATE)
(gdb) 
1810        return slot;
(gdb) 
1811    }

到此,相信大家对“怎么理解PostgreSQL的分区表”有了更深的了解,不妨来实际操作一番吧!这里是编程网网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

您可能感兴趣的文档:

--结束END--

本文标题: 怎么理解PostgreSQL的分区表

本文链接: https://www.lsjlt.com/news/64771.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • 怎么理解PostgreSQL的分区表
    本篇内容主要讲解“怎么理解PostgreSQL的分区表”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“怎么理解PostgreSQL的分区表”吧!在PG中,分区表通...
    99+
    2024-04-02
  • PostgreSQL怎么创建分区表
    这篇文章主要介绍“PostgreSQL怎么创建分区表”,在日常操作中,相信很多人在PostgreSQL怎么创建分区表问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Postgr...
    99+
    2024-04-02
  • PostgreSQL中表的继承和分区怎么实现
    这篇文章主要介绍PostgreSQL中表的继承和分区怎么实现,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!一、表的继承:    这个概念对于很多已经熟悉...
    99+
    2024-04-02
  • 怎么理解PostgreSQL表继承
    这篇文章主要介绍“怎么理解PostgreSQL表继承”,在日常操作中,相信很多人在怎么理解PostgreSQL表继承问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”怎么理解Po...
    99+
    2024-04-02
  • PostgreSQL中怎么利用表继承实现分区表
    这篇文章将为大家详细讲解有关PostgreSQL中怎么利用表继承实现分区表,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。概述分区指的是将逻辑上一的一个大表分...
    99+
    2024-04-02
  • PostgreSQL如何创建分区表
    这篇文章主要介绍“PostgreSQL如何创建分区表”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“PostgreSQL如何创建分区表”文章能帮助大家解决问题。前言PG 假如我们想像Hive那也创建动...
    99+
    2023-07-02
  • 怎样理解Oracle分区表
    这篇文章将为大家详细讲解有关怎样理解Oracle分区表,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。 一:什么是分区(Partition)? 分区是将一...
    99+
    2024-04-02
  • PostgreSQL表分区的方式有哪些
    这篇文章主要讲解了“PostgreSQL表分区的方式有哪些”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“PostgreSQL表分区的方式有哪些”吧!目录一、简介二、三种方式1、Range范围...
    99+
    2023-06-20
  • 怎么理解PostgreSQL的词法分析
    这篇文章主要讲解了“怎么理解PostgreSQL的词法分析”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么理解PostgreSQL的词法分析”吧!一、词法...
    99+
    2024-04-02
  • 怎么理解数据库移动分区表和分区索引的表空间
    这篇文章主要介绍“怎么理解数据库移动分区表和分区索引的表空间”,在日常操作中,相信很多人在怎么理解数据库移动分区表和分区索引的表空间问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解...
    99+
    2024-04-02
  • 浅谈PostgreSQL表分区的三种方式
    目录一、简介二、三种方式2.1、Range范围分区2.2、List列表分区2.3、Hash哈希分区三、总结一、简介 表分区是解决一些因单表过大引用的性能问题的方式,比如某张表过大就会...
    99+
    2024-04-02
  • PostgreSQL 源码解读(98)- 分区表#4(数据查询路由#1-“扩展”分区表)
    在查询分区表的时候PG如何确定查询的是哪个分区?如何确定?相关的机制是什么?接下来几个章节将一一介绍,本节是第一部分。 零、实现机制 我们先看下面的例子,两个普通表t_normal...
    99+
    2024-04-02
  • PostgreSQL 10中如何使用分区表
    本篇文章给大家分享的是有关PostgreSQL 10中如何使用分区表,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。分区介绍PostgreSQL...
    99+
    2024-04-02
  • 怎么理解PostgreSQL全表扫描问题
    这篇文章主要讲解了“怎么理解PostgreSQL全表扫描问题”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么理解PostgreSQL全表扫描问题”吧!本节...
    99+
    2024-04-02
  • 怎么理解oracle 12c分区表不完全索引
    本篇内容主要讲解“怎么理解oracle 12c分区表不完全索引”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“怎么理解oracle 12c分区表不完全索引”吧!有...
    99+
    2024-04-02
  • Oracle怎么把非分区表转为分区表
    这篇文章主要介绍“Oracle怎么把非分区表转为分区表”,在日常操作中,相信很多人在Oracle怎么把非分区表转为分区表问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Orac...
    99+
    2024-04-02
  • PostgreSQL在查询分区表时如何确定查询的是哪个分区
    这篇文章给大家分享的是有关PostgreSQL在查询分区表时如何确定查询的是哪个分区的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。在规划阶段,函数set_rel_size中,如R...
    99+
    2024-04-02
  • 怎么理解PostgreSQL创建数据表时的参数fillfactor
    这篇文章主要讲解了“怎么理解PostgreSQL创建数据表时的参数fillfactor”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么理解PostgreS...
    99+
    2024-04-02
  • oracle怎么批量删除分区表的分区
    在Oracle中,可以使用以下步骤来批量删除分区表的分区: 首先,连接到数据库并登录到sys用户或具有适当权限的用户。 使用...
    99+
    2024-04-20
    oracle
  • MySQL分区表的分区原理及优缺点
    这篇文章主要介绍“MySQL分区表的分区原理及优缺点”,在日常操作中,相信很多人在MySQL分区表的分区原理及优缺点问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”MySQL分...
    99+
    2024-04-02
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作