zoukankan      html  css  js  c++  java
  • Oracle partitioning is not always a good idea.

    a) partitioning is NOT fast=true
    b) you MUST understand the physics behind the data, whats happening.

    Say you took a table T with columns ( ID primary key, CUST_ID, ... )

    You hash partitioned into 64 partitions by ID.
    You have a local index on CUST_ID.

    MOST of your queries are "where cust_id = :x"

    Guess what you just accomplished.

    You accomplished the feat of increasing your IO by a factor of 64!!!  by 64 times!!

    why?  well, we have 64 tiny little index segments to range scan -- your customer id could
    be in any, all or none of them.

    Solution -- hash partition table, range partition index by cust_id -- now you will NOT
    have affected read performance at all (probably, it could be a tiny bit better with
    partitioning but nothing phenomenal) but you might find that you've reduced contention on
    modifications since you have N indexes and N table segments (and hence N freelists at
    least and so on)


    If you have my new book -- you'll laugh at how closely your example above mirrors the one
    in the book, almost scary (but I only did 8 partitions, to show an 8 times increase in
    IO)
  • 相关阅读:
    JS随笔
    tp5 redis 单例模式 转载
    分享我编程工作经历及对软件开发前景的看法
    redis详解(一)-- 概述
    redis详解(二)-- 数据类型详解
    redis详解(四)-- 高可用分布式集群
    redis详解(三)
    新工科平台
    关于Nginx的负载均衡
    微信退款回调
  • 原文地址:https://www.cnblogs.com/tracy/p/2107645.html
Copyright © 2011-2022 走看看