主頁 > 資料庫 > Hive執行計劃之什么是hiveSQL向量化模式及優化詳解

Hive執行計劃之什么是hiveSQL向量化模式及優化詳解

2023-06-10 08:45:01 資料庫

Hive開啟向量化模式也是hiveSQL優化方法中的一種,可以提升hive查詢速率,也叫hive矢量化,

問題1:那么什么是hive向量化模式呢?

問題2:hive向量化什么情況下可以被使用,或者說它有哪些使用場景呢?

問題3:如何查看hive向量化使用的相關資訊?

1.什么是hive向量化模式

hive向量化模式是hive的一個特性,也叫hive矢量化,在沒有引入向量化的執行模式之前,一般的查詢操作一次只處理一行資料,在向量化查詢執行時一次處理1024行的塊來簡化系統底層的操作,提高了資料處理的性能,

在底層,hive提供的向量模式,并不是重寫了Mapper函式,而是通過實作inputformat介面,創建了VectorizedParquetInputFormat類,來構建一個批量輸入的陣列,

向量化模式開啟的方式如下:

-- 開啟hive向量化模式
set hive.vectorized.execution.enabled = true;

2.Hive向量化模式支持的使用場景

Hive向量化模式并不是可以直接使用,它對使用的計算引擎,使用資料的資料型別,以及使用的SQL函式都有一定的要求,

2.1 hive向量化模式使用前置條件

  • 不同的計算引擎支持程度不一樣:MR計算引擎僅支持Map階段的向量化,Tez和Spark計算引擎可以支持Map階段和Reduce階段的向量化,

  • hive檔案存盤型別必須為ORC或者Parquet等列存盤檔案型別,

2.2 向量模式支持的資料型別

  • tinyint
  • smallint
  • int
  • bigint
  • boolean
  • float
  • double
  • decimal
  • date
  • timestamp
  • string

以上資料型別為向量化模式支持的資料型別,如果使用其他資料型別,例如array和map等,開啟了向量化模式查詢,查詢操作將使用標準的方式單行執行,但不會報錯,

2.3 向量化模式支持的函式

算數運算式: +, -, *, /, %
邏輯關系:AND, OR, NOT
比較關系(過濾器): <, >, <=, >=, =, !=, BETWEEN, IN ( list-of-constants ) as filters
使用 AND, OR, NOT, <, >, <=, >=, =, != 等布林值運算式(非過濾器)
空值校驗:IS [NOT] NULL
所有的數學函式,例如 SIN, LOG等
字串函式: SUBSTR, CONCAT, TRIM, LTRIM, RTRIM, LOWER, UPPER, LENGTH
型別轉換:cast
Hive UDF函式, 包括標準和通用的UDF函式
日期函式:YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, UNIX_TIMESTAMP
IF條件運算式

以上函式運算式在運行時支持使用向量化模式,

3.如何查看hiveSQL向量化運行資訊

查看hive向量化資訊是前置的,可以通過執行計劃命令explain vectorization查看向量化描述資訊,當然,執行中,也可以通過日志了解向量化執行資訊,但相對篩選關鍵資訊比較復雜,

explain vectorization是在hive2.3.0版本之后發布的功能,可以查看map階段和reduce階段為什么沒有開啟矢量化模式,類似除錯功能,

explain vectorization支持的語法:explain vectorization [only] [summary|operator|expression|detail]

  • explain vectorization:不帶后置引數,顯示執行計劃的向量化資訊(啟用向量化)以及 Map 和 Reduce 階段的摘要,
  • only:這個命令只顯示向量化模式相關的描述資訊,這個引數和后面的其他引數是可以一起使用的,與它相對的是explain vectorization,
  • summary:這是個默認引數,任何命令后面默認有該引數,
  • operator:補充顯示運算子的向量化資訊,例如資料過濾向量化,還包括summary的所有資訊,
  • expression:補充顯示運算式的向量化資訊,例如謂詞運算式,還包括 summary 和 operator 的所有資訊,
  • detail:顯示最詳細級別的向量化資訊,它包括summary、operator、expression的所有資訊,

接下來我們通過實體來查看以上命令的展示內容:

3.1 explain vectorization only只查詢向量化描述資訊內容

例1 關閉向量化模式的情況下,使用explain vectorization only,

-- 關閉向量化模式
set hive.vectorized.execution.enabled = false;
explain vectorization only
select age,count(0) as num from temp.user_info_all where ymd = '20230505'
and age < 30 and nick like '%小%'
group by age;

執行結果:

PLAN VECTORIZATION:
  enabled: false		#標識向量化模式沒有開啟
  enabledConditionsNotMet: [hive.vectorized.execution.enabled IS false]  #未開啟原因

如上,如果關閉向量化模式,輸出結果中PLAN VECTORIZATION 這里可以看到該模式沒有被開啟,原因是沒有滿足enabledConditionsNotMet 指代的條件,

例2 開啟向量化模式的情況下,使用explain vectorization only,

-- 開啟向量化模式
set hive.vectorized.execution.enabled = true;
explain vectorization only
select age,count(0) as num from temp.user_info_all where ymd = '20230505'
and age < 30 and nick like '%小%'
group by age;

執行結果:

PLAN VECTORIZATION:
  enabled: true
  enabledConditionsMet: [hive.vectorized.execution.enabled IS true]

STAGE DEPENDENCIES:
  Stage-1 is a root stage
  Stage-0 depends on stages: Stage-1

STAGE PLANS:
  Stage: Stage-1
    Map Reduce
      Execution mode: vectorized
      Map Vectorization:
          enabled: true
          enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
          groupByVectorOutput: true
          inputFileFormats: org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat
          allNative: false
          usesVectorUDFAdaptor: false
          vectorized: true
      Reduce Vectorization:
          enabled: false
          enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true
          enableConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false

  Stage: Stage-0
    Fetch Operator

執行結果有三部分內容:

  • PLAN VECTORIZATION
  • STAGE DEPENDENCIES
  • STAGE PLANS

其中STAGE PLANS列印的并不是explain中map和reduce階段的運行資訊,而是這兩個階段使用向量化模式的資訊,

對以上案例內容進行關鍵詞解讀:

  • Execution mode:當前的執行模式,vectorized表示當前模式是向量化的模式,
  • Map Vectorization:當前是map階段的向量化執行模式資訊,
  • enabled:是否開啟該階段向量化模式,true表示開啟,false表示關閉,在上面案例中Map Vectorization階段是開啟,Reduce Vectorization階段是關閉,
  • enabledConditionsMet:表示當前階段,開啟向量化模式已經滿足的條件,
  • enableConditionsNotMet:表示當前階段,開啟向量化模式未滿足的條件,
  • groupByVectorOutput:標識該階段分組聚合操作是否開啟向量化模式,
  • inputFileFormats:當前階段,輸入的檔案格式,
  • allNative:是否都是本地化操作,false表示不是,
  • usesVectorUDFAdaptor:值為true時,表示至少有一個向量化運算式在使用VectorUDFAdaptor(向量化udf配接器)
  • vectorized:向量化模式執行是否成功,true為是向量化執行,false為不是向量化執行,
  • Reduce Vectorization:reduce階段向量化模式執行資訊,

以上整個程序在map階段執行了向量化模式,在reduce階段沒有執行向量化模式,是因為上文提到的reduce階段mr計算引擎不支持,需要tez或spark計算引擎,

3.2 explain vectorization 查看hive向量化模式執行資訊

可以執行以下命令:

-- 開啟向量化模式
set hive.vectorized.execution.enabled = true;
explain vectorization only summary
select age,count(0) as num from temp.user_info_all where ymd = '20230505'
and age < 30 and nick like '%小%'
group by age;

會發現explain vectorization only命令和explain vectorization only summary命令執行結果完全一致

后續其他命令也類似,explain vectorization等同于explain vectorization summary,summary引數是一個默認引數,可以忽略,

例3 使用explain vectorization命令查看hive向量化模式執行資訊,

-- 開啟向量化模式
set hive.vectorized.execution.enabled = true;
explain vectorization
select age,count(0) as num from temp.user_info_all where ymd = '20230505'
and age < 30 and nick like '%小%'
group by age;

其執行結果是explain和explain vectorization only兩者相加執行結果:

PLAN VECTORIZATION:
  enabled: true
  enabledConditionsMet: [hive.vectorized.execution.enabled IS true]

STAGE DEPENDENCIES:
  Stage-1 is a root stage
  Stage-0 depends on stages: Stage-1

STAGE PLANS:
  Stage: Stage-1
    Map Reduce
      Map Operator Tree:
          TableScan
            alias: user_info_all
            Statistics: Num rows: 32634295 Data size: 783223080 Basic stats: COMPLETE Column stats: NONE
            Filter Operator
              predicate: ((age < 30) and (nick like '%小%')) (type: boolean)
              Statistics: Num rows: 5439049 Data size: 130537176 Basic stats: COMPLETE Column stats: NONE
              Select Operator ... 	#省略部分
      # 向量化模式描述資訊
      Execution mode: vectorized
      Map Vectorization:
          enabled: true
          enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
          groupByVectorOutput: true
          inputFileFormats: org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat
          allNative: false
          usesVectorUDFAdaptor: false
          vectorized: true
      Reduce Vectorization:
          enabled: false
          enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true
          enableConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false
      Reduce Operator Tree:
        Group By Operator
          aggregations: count(VALUE._col0)
          ...  	#省略部分

  Stage: Stage-0
    Fetch Operator
      limit: -1
      Processor Tree:
        ListSink

... 為省略了一部分資訊,

3.3 使用operator查看運算子的向量化資訊

使用explain vectorization operator可以查看顯示執行計劃程序中運算子的向量化資訊和explain運行階段資訊,

簡化版為explain vectorization only operator,加only相對前者少的部分為explain運行階段資訊,下同,explain運行階段資訊我們就不查詢了,感興趣小伙伴可以自行查詢查看,

例4 簡化版為explain vectorization only operator查看hiveSQL矢量化描述資訊,

set hive.vectorized.execution.enabled = true;
explain vectorization only operator
select age,count(0) as num from temp.user_info_all where ymd = '20230505'
and age < 30 and nick like '%小%'
group by age;

執行結果:

PLAN VECTORIZATION:
  enabled: true
  enabledConditionsMet: [hive.vectorized.execution.enabled IS true]

STAGE DEPENDENCIES:
  Stage-1 is a root stage
  Stage-0 depends on stages: Stage-1

STAGE PLANS:
  Stage: Stage-1
    Map Reduce
      Map Operator Tree:
      			# 表掃描的向量化資訊
            TableScan Vectorization:
            		# 讀表采用本地的向量化模式掃描
                native: true
              # 過濾操作的向量化資訊
              Filter Vectorization:
              		# 過濾操作的類
                  className: VectorFilterOperator
                  # 過濾采用本地的向量化模式
                  native: true
                # 列篩選的向量化資訊
                Select Vectorization:
                    className: VectorSelectOperator
                    native: true
                  # 聚合操作的向量化資訊
                  Group By Vectorization:
                      className: VectorGroupByOperator
                      # 輸出采用向量化輸出
                      vectorOutput: true
                      #非本地操作
                      native: false
                    # reduce output向量化資訊
                    Reduce Sink Vectorization:
                        className: VectorReduceSinkOperator
                        native: false
                        # 已滿足的Reduce Sink向量化條件
                        nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, Not ACID UPDATE or DELETE IS true, No buckets IS true, No TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
                        # 不滿足的Reduce Sink向量化條件
                        nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false, Uniform Hash IS false
      # 向量化描述資訊,同explain vectorization only,不作標注了,
      Execution mode: vectorized
      Map Vectorization:
          enabled: true
          enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
          groupByVectorOutput: true
          inputFileFormats: org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat
          allNative: false
          usesVectorUDFAdaptor: false
          vectorized: true
      Reduce Vectorization:
          enabled: false
          enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true
          enableConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false
      Reduce Operator Tree:
          Group By Vectorization:
              vectorOutput: false
              native: false

  Stage: Stage-0
    Fetch Operator

以上內容關鍵詞在代碼塊有行注釋標注,可以看到explain vectorization only operator命令多了在explain執行計劃程序中增加了具體每一個運算子(operator)步驟的是否向量化及具體資訊,如果不滿足向量化步驟,哪些條件滿足,哪些條件不滿足,也做了標注,

3.4 使用expression顯示欄位粒度的向量化資訊

expression:補充顯示運算式的向量化資訊,例如謂詞運算式,還包括 summary 和 operator 的所有資訊,

例5 簡化版explain vectorization only expression命令查看hiveSQL執行計劃運算式的向量化資訊,

set hive.vectorized.execution.enabled = true;
explain vectorization only expression
select age,count(0) as num from temp.user_info_all where ymd = '20230505'
and age < 30 and nick like '%小%'
group by age;

執行結果:

# 同explain vectorization
PLAN VECTORIZATION:
  enabled: true
  enabledConditionsMet: [hive.vectorized.execution.enabled IS true]

# 同explain vectorization
STAGE DEPENDENCIES:
  Stage-1 is a root stage
  Stage-0 depends on stages: Stage-1

STAGE PLANS:
  Stage: Stage-1
    Map Reduce
      Map Operator Tree:
            TableScan Vectorization:
                native: true
                # 表示表掃描后有25列,
                projectedOutputColumns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
              Filter Vectorization:
                  className: VectorFilterOperator
                  native: true
                  # 表示謂詞過濾少選有兩列,以及過濾條件的內容,
                  predicateExpression: FilterExprAndExpr(children: FilterLongColLessLongScalar(col 11, val 30), FilterStringColLikeStringScalar(col 7, pattern %小%))
                Select Vectorization:
                    className: VectorSelectOperator
                    native: true
                    # 表示進行列篩選的具體列,這里是第12列,陣列下標為11.如果為空[],則表示任何一個列,
                    projectedOutputColumns: [11]
                  Group By Vectorization:
                  		# 表示使用VectorUDAFCount的方法進行count計數統計以及輸出型別,
                      aggregators: VectorUDAFCount(ConstantVectorExpression(val 0) -> 25:int) -> bigint
                      className: VectorGroupByOperator
                      vectorOutput: true
                      # 聚合列
                      keyExpressions: col 11
                      native: false
                      # 輸出為一個新的陣列,只有一列
                      projectedOutputColumns: [0]
                    Reduce Sink Vectorization:
                        className: VectorReduceSinkOperator
                        native: false
                        nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, Not ACID UPDATE or DELETE IS true, No buckets IS true, No TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
                        nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false, Uniform Hash IS false
      # 向量化描述資訊,同explain vectorization only,不作標注了,
      Execution mode: vectorized
      Map Vectorization:
          enabled: true
          enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
          groupByVectorOutput: true
          inputFileFormats: org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat
          allNative: false
          usesVectorUDFAdaptor: false
          vectorized: true
      Reduce Vectorization:
          enabled: false
          enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true
          enableConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false
      Reduce Operator Tree:
          Group By Vectorization:
              vectorOutput: false
              native: false
              projectedOutputColumns: null

  Stage: Stage-0
    Fetch Operator

以上列印資訊內容可以看出 explain vectorization only expression命令相對列印的資訊是更細粒度到欄位級別的資訊了,基本上將操作的每一列是否使用向量化處理都列印了出來,這樣我們可以很好的判斷哪些欄位型別是不支持向量化模式的,

3.5 使用detail查看最詳細級別的向量化資訊

explain vectorization only detail 查看最詳細級別的向量化資訊,它包括summary、operator、expression的所有資訊,

例6 explain vectorization only detail 查看最詳細級別的向量化資訊,

set hive.vectorized.execution.enabled = true;
explain vectorization only detail
select age,count(0) as num from temp.user_info_all where ymd = '20230505'
and age < 30 and nick like '%小%'
group by age;

執行結果:

PLAN VECTORIZATION:
  enabled: true
  enabledConditionsMet: [hive.vectorized.execution.enabled IS true]

STAGE DEPENDENCIES:
  Stage-1 is a root stage
  Stage-0 depends on stages: Stage-1

# 同explain vectorization only expression
STAGE PLANS:
  Stage: Stage-1
    Map Reduce
      Map Operator Tree:
            TableScan Vectorization:
                native: true
                projectedOutputColumns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
              Filter Vectorization:
                  className: VectorFilterOperator
                  native: true
                  predicateExpression: FilterExprAndExpr(children: FilterLongColLessLongScalar(col 11, val 30), FilterStringColLikeStringScalar(col 7, pattern %小%))
                Select Vectorization:
                    className: VectorSelectOperator
                    native: true
                    projectedOutputColumns: [11]
                  Group By Vectorization:
                      aggregators: VectorUDAFCount(ConstantVectorExpression(val 0) -> 25:int) -> bigint
                      className: VectorGroupByOperator
                      vectorOutput: true
                      keyExpressions: col 11
                      native: false
                      projectedOutputColumns: [0]
                    Reduce Sink Vectorization:
                        className: VectorReduceSinkOperator
                        native: false
                        nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, Not ACID UPDATE or DELETE IS true, No buckets IS true, No TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
                        nativeConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false, Uniform Hash IS false
      # 向量化描述資訊這里做了更詳細的描述
      Execution mode: vectorized
      Map Vectorization:
          enabled: true
          enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
          groupByVectorOutput: true
          inputFileFormats: org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat
          allNative: false
          usesVectorUDFAdaptor: false
          vectorized: true
          rowBatchContext:
              dataColumnCount: 24
              includeColumns: [7, 11]
              dataColumns: uid:bigint, reg_time:string, cc:string, client:string, if_new:int, last_location:string, platform_reg:string, nick:string, gender:int, birthday:string, constellation:string, age:bigint, description:string, is_realname:int, realname_date:string, last_active_day:string, is_active:int, user_status:int, user_ua:string, vst_cnt:bigint, vst_dur:bigint, is_vip:int, chat_uv:bigint, chat_cnt:bigint
              partitionColumnCount: 1
              partitionColumns: ymd:string
              scratchColumnTypeNames: bigint
      Reduce Vectorization:
          enabled: false
          enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true
          enableConditionsNotMet: hive.execution.engine mr IN [tez, spark] IS false
      Reduce Operator Tree:
          Group By Vectorization:
              vectorOutput: false
              native: false
              projectedOutputColumns: null

  Stage: Stage-0
    Fetch Operator

通過以上內容可以看出 explain vectorization only detail列印的資訊其中執行計劃部分內容和explain vectorization only expression粒度一致,在向量化描述資訊部分做了更細粒度的描述,到欄位級別,

以上就是hive向量化explain vectorization相關引數的使用,其命令在我們使用向量化模式中進行驗證支持的函式和資料型別逐步遞進,可以根據需要使用,

而hive向量化模式可以極大程度的優化hive執行速度,

4.hive向量化模式優化執行比對

例7 執行優化速度比對,

-- 代碼1 開啟向量化模式
set hive.vectorized.execution.enabled = true;
select age,count(0) as num from temp.user_info_all where ymd = '20230505'
and age < 30 and nick like '%小%'
group by age;

-- 代碼2 關閉向量化模式
set hive.vectorized.execution.enabled = false;
select age,count(0) as num from temp.user_info_all where ymd = '20230505'
and age < 30 and nick like '%小%'
group by age;

執行結果:

# 代碼1執行結果開啟向量化模式
MapReduce Total cumulative CPU time: 1 minutes 1 seconds 740 msec
Ended Job = job_1675664438694_13647623
MapReduce Jobs Launched: 
Stage-Stage-1: Map: 6  Reduce: 5   Cumulative CPU: 61.74 sec   HDFS Read: 367242142 HDFS Write: 1272 SUCCESS
Total MapReduce CPU Time Spent: 1 minutes 1 seconds 740 msec
OK
15      23
... # 省略資料
29      81849
Time taken: 41.322 seconds, Fetched: 31 row(s)

# 代碼2執行結果關閉向量化模式
MapReduce Total cumulative CPU time: 1 minutes 39 seconds 190 msec
Ended Job = job_1675664438694_13647754
MapReduce Jobs Launched: 
Stage-Stage-1: Map: 6  Reduce: 5   Cumulative CPU: 99.19 sec   HDFS Read: 367226626 HDFS Write: 1272 SUCCESS
Total MapReduce CPU Time Spent: 1 minutes 39 seconds 190 msec
OK
15      23
... # 省略資料
29      81849
Time taken: 50.724 seconds, Fetched: 31 row(s)

以上結果可以看出,開啟向量化模式執行結果查詢耗時減少,雖然減少的不多,但在CPU使用上少了三分之一的資源,可見開啟向量化模式不僅可以提高查詢速度,還可以節省查詢資源,

以上開啟向量化模式為mr引擎測驗結果,tez和spark還具有更優的執行表現,

下一期:Hive執行計劃之只有map階段SQL性能分析和解讀

按例,歡迎點擊此處關注我的個人公眾號,交流更多知識,

后臺回復關鍵字 hive,隨機贈送一本魯邊備注版珍藏大資料書籍,

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/554840.html

標籤:其他

上一篇:Kafka關鍵原理

下一篇:返回列表

標籤雲
其他(160744) Python(38219) JavaScript(25491) Java(18216) C(15237) 區塊鏈(8270) C#(7972) AI(7469) 爪哇(7425) MySQL(7245) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5873) 数组(5741) R(5409) Linux(5347) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4589) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2435) ASP.NET(2404) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) .NET技术(1984) 功能(1967) HtmlCss(1957) Web開發(1951) C++(1933) python-3.x(1918) 弹簧靴(1913) xml(1889) PostgreSQL(1880) .NETCore(1863) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • GPU虛擬機創建時間深度優化

    **?桔妹導讀:**GPU虛擬機實體創建速度慢是公有云面臨的普遍問題,由于通常情況下創建虛擬機屬于低頻操作而未引起業界的重視,實際生產中還是存在對GPU實體創建時間有苛刻要求的業務場景。本文將介紹滴滴云在解決該問題時的思路、方法、并展示最終的優化成果。 從公有云服務商那里購買過虛擬主機的資深用戶,一 ......

    uj5u.com 2020-09-10 06:09:13 more
  • 可編程網卡芯片在滴滴云網路的應用實踐

    **?桔妹導讀:**隨著云規模不斷擴大以及業務層面對延遲、帶寬的要求越來越高,采用DPDK 加速網路報文處理的方式在橫向縱向擴展都出現了局限性。可編程芯片成為業界熱點。本文主要講述了可編程網卡芯片在滴滴云網路中的應用實踐,遇到的問題、帶來的收益以及開源社區貢獻。 #1. 資料中心面臨的問題 隨著滴滴 ......

    uj5u.com 2020-09-10 06:10:21 more
  • 滴滴資料通道服務演進之路

    **?桔妹導讀:**滴滴資料通道引擎承載著全公司的資料同步,為下游實時和離線場景提供了必不可少的源資料。隨著任務量的不斷增加,資料通道的整體架構也隨之發生改變。本文介紹了滴滴資料通道的發展歷程,遇到的問題以及今后的規劃。 #1. 背景 資料,對于任何一家互聯網公司來說都是非常重要的資產,公司的大資料 ......

    uj5u.com 2020-09-10 06:11:05 more
  • 滴滴AI Labs斬獲國際機器翻譯大賽中譯英方向世界第三

    **桔妹導讀:**深耕人工智能領域,致力于探索AI讓出行更美好的滴滴AI Labs再次斬獲國際大獎,這次獲獎的專案是什么呢?一起來看看詳細報道吧! 近日,由國際計算語言學協會ACL(The Association for Computational Linguistics)舉辦的世界最具影響力的機器 ......

    uj5u.com 2020-09-10 06:11:29 more
  • MPP (Massively Parallel Processing)大規模并行處理

    1、什么是mpp? MPP (Massively Parallel Processing),即大規模并行處理,在資料庫非共享集群中,每個節點都有獨立的磁盤存盤系統和記憶體系統,業務資料根據資料庫模型和應用特點劃分到各個節點上,每臺資料節點通過專用網路或者商業通用網路互相連接,彼此協同計算,作為整體提供 ......

    uj5u.com 2020-09-10 06:11:41 more
  • 滴滴資料倉庫指標體系建設實踐

    **桔妹導讀:**指標體系是什么?如何使用OSM模型和AARRR模型搭建指標體系?如何統一流程、規范化、工具化管理指標體系?本文會對建設的方法論結合滴滴資料指標體系建設實踐進行解答分析。 #1. 什么是指標體系 ##1.1 指標體系定義 指標體系是將零散單點的具有相互聯系的指標,系統化的組織起來,通 ......

    uj5u.com 2020-09-10 06:12:52 more
  • 單表千萬行資料庫 LIKE 搜索優化手記

    我們經常在資料庫中使用 LIKE 運算子來完成對資料的模糊搜索,LIKE 運算子用于在 WHERE 子句中搜索列中的指定模式。 如果需要查找客戶表中所有姓氏是“張”的資料,可以使用下面的 SQL 陳述句: SELECT * FROM Customer WHERE Name LIKE '張%' 如果需要 ......

    uj5u.com 2020-09-10 06:13:25 more
  • 滴滴Ceph分布式存盤系統優化之鎖優化

    **桔妹導讀:**Ceph是國際知名的開源分布式存盤系統,在工業界和學術界都有著重要的影響。Ceph的架構和演算法設計發表在國際系統領域頂級會議OSDI、SOSP、SC等上。Ceph社區得到Red Hat、SUSE、Intel等大公司的大力支持。Ceph是國際云計算領域應用最廣泛的開源分布式存盤系統, ......

    uj5u.com 2020-09-10 06:14:51 more
  • es~通過ElasticsearchTemplate進行聚合~嵌套聚合

    之前寫過《es~通過ElasticsearchTemplate進行聚合操作》的文章,這一次主要寫一個嵌套的聚合,例如先對sex集合,再對desc聚合,最后再對age求和,共三層嵌套。 Aggregations的部分特性類似于SQL語言中的group by,avg,sum等函式,Aggregation ......

    uj5u.com 2020-09-10 06:14:59 more
  • 爬蟲日志監控 -- Elastc Stack(ELK)部署

    傻瓜式部署,只需替換IP與用戶 導讀: 現ELK四大組件分別為:Elasticsearch(核心)、logstash(處理)、filebeat(采集)、kibana(可視化) 下載均在https://www.elastic.co/cn/downloads/下tar包,各組件版本最好一致,配合fdm會 ......

    uj5u.com 2020-09-10 06:15:05 more
最新发布
  • Hive執行計劃之什么是hiveSQL向量化模式及優化詳解

    Hive開啟向量化模式也是hiveSQL優化方法中的一種,可以提升hive查詢速率,也叫hive矢量化。 問題1:那么什么是hive向量化模式呢? 問題2:hive向量化什么情況下可以被使用,或者說它有哪些使用場景呢? 問題3:如何查看hive向量化使用的相關資訊? ## 1.什么是hive向量化模 ......

    uj5u.com 2023-06-10 08:45:01 more
  • Kafka關鍵原理

    # 日志分段切分條件 日志分段檔案切分包含以下4個條件,滿足其一即可: 1. 當前日志分段檔案的大小超過了broker端引數 `log.segment.bytes` 配置的值。`log.segment.bytes`引數的默認值為 `1073741824`,即1GB 2. 當前日志分段中訊息的最小時間 ......

    uj5u.com 2023-06-10 08:44:52 more
  • 華為云新一代分布式資料庫GaussDB,給世界一個更優選擇

    摘要:與伙伴一起,共建繁榮開放的GaussDB資料庫新生態。 本文分享自華為云社區《華為云新一代分布式資料庫GaussDB,給世界一個更優選擇》,作者:華為云頭條。 6月7日,在華為全球智慧金融峰會2023上,華為常務董事、華為云CEO張平安以“一切皆服務,做好金融數字化云底座和使能器”為主題發表演 ......

    uj5u.com 2023-06-10 08:44:29 more
  • oracle 之存盤程序 begin ...... ; ...... end

    點擊查看代碼 ``` begin merge into ly_yjs_hxsj.T_XSGL_XSXX_CZRZ rz using ( select a.XS_ID xsid, xh, xm, '02' as bglx,'修改學生:'||xm||':學位操作撤銷學位證書號,原學位證書號:'|| BJ ......

    uj5u.com 2023-06-10 08:44:22 more
  • 分布式資料庫 Join 查詢設計與實作淺析

    本文記錄 Mysql 分庫分表 和 Elasticsearch Join 查詢的實作思路,了解分布式場景資料處理的設計方案。文章從常用的關系型資料庫 MySQL 的分庫分表Join 分析,再到非關系型 ElasticSearch 來分析 Join 實作策略。逐步深入Join 的實作機制。 ......

    uj5u.com 2023-06-10 08:44:17 more
  • openEuler22+GreatSQL+dbops玩轉MGR

    > 芬達,《芬達的資料庫學習筆記》公眾號作者,開源愛好者,擅長 MySQL、ansible。 ## 背景 ### openEuler 是什么 openEuler22.03 LTS 是 openEuler 社區于 2022 年 3 月發布的開源作業系統(從系統版本的命名不難發現吧)。openEuler ......

    uj5u.com 2023-06-10 08:44:10 more
  • es索引資料復制并增加條件和修改目標資料值

    es操作同一個索引里資料的復制語法 復制資料: POST _reindex { "source": { "index": "source_index" }, "dest": { "index": "destination_index" } } 欄位值修改: POST source_index/_up ......

    uj5u.com 2023-06-10 08:44:03 more
  • 華為云新一代分布式資料庫GaussDB,給世界一個更優選擇

    摘要:與伙伴一起,共建繁榮開放的GaussDB資料庫新生態。 本文分享自華為云社區《華為云新一代分布式資料庫GaussDB,給世界一個更優選擇》,作者:華為云頭條。 6月7日,在華為全球智慧金融峰會2023上,華為常務董事、華為云CEO張平安以“一切皆服務,做好金融數字化云底座和使能器”為主題發表演 ......

    uj5u.com 2023-06-10 08:43:26 more
  • oracle 之存盤程序 begin ...... ; ...... end

    點擊查看代碼 ``` begin merge into ly_yjs_hxsj.T_XSGL_XSXX_CZRZ rz using ( select a.XS_ID xsid, xh, xm, '02' as bglx,'修改學生:'||xm||':學位操作撤銷學位證書號,原學位證書號:'|| BJ ......

    uj5u.com 2023-06-10 08:42:17 more
  • 【后端面經-資料庫】MySQL的存盤引擎簡介

    [TOC](【后端面經-資料庫】MySQL的存盤引擎簡介) # MySQL的存盤引擎 mysql主要有四類存盤引擎,目前主要使用InnoDB作為存盤引擎。 ## 0. 存盤引擎的查看和修改 - 查看當前資料庫的默認存盤引擎 ```sql show variables like 'default_st ......

    uj5u.com 2023-06-10 08:41:56 more