タグ

2013年8月26日のブックマーク (5件)

  • B+Trees and why I love them, part I - Ayende @ Rahien

    One of the things that I enjoy about learning new things is the way it changes the way I look at the stuff that I already knows. Reading the LMDB codebase, and implementing a persistent B+Tree has given me a new depth of understanding about how relational databases (and Esent, too), work. I am going to go back to level zero and assume that you have never heard about this. You probably know what a

    tgk
    tgk 2013/08/26
    output_2.jpgはsequential insertによるB+treeの成長の様子。それまでのroot nodeはブランチになり、新規ページが新たなroot nodeになる。だから左右のバランスが崩れない
  • Dvořák: Symphony No.7 - Haitink/SKD(2004Live)

    tgk
    tgk 2013/08/26
    熱演
  • 2012-11-21

    確認 # cat /proc/swaps Filename Type Size Used Priority /dev/sda2 partition 2096472 96 -1SWAPに当てる領域のファイルを作成する bs=が単位 count=がサイズ 以下の例だと2GB(2048MB) dd if=/dev/zero of=/swap_file.extended bs=1M count=2048SWAP領域の作成 mkswap /swap_file.extendedSWAP領域に追加する swapon /swap_file.extended確認 # cat /proc/swaps Filename Type Size Used Priority /dev/sda2 partition 2096472 96 -1 /swap_file.extended file 2097144 0 -2 #

    2012-11-21
    tgk
    tgk 2013/08/26
    "numactl --show"でシステムのメモリ確保ポリシーを確認。MySQLプロセスのポリシーだけ変更して回避できる模様
  • Working with sort keys - Amazon Redshift

    We recommend that you create your tables with SORTKEY AUTO. If you do so, then Amazon Redshift uses automatic table optimization to choose the sort key. For more information, see Working with automatic table optimization. The rest of this section provides details about the sort order. When you create a table, you can alternatively define one or more of its columns as sort keys. When data is initia

    tgk
    tgk 2013/08/26
    sortkeyでpartitioning同様の効果が得られる(sortkey列の各ブロックのmin/max値がメタデータとして保持されているから)。追記データは元データと別領域に保存されるのでソートが不完全になる。完全ソートに戻すにはvacuumする
  • Working with data distribution styles - Amazon Redshift

    When you load data into a table, Amazon Redshift distributes the rows of the table to each of the compute nodes according to the table's distribution style. When you run a query, the query optimizer redistributes the rows to the compute nodes as needed to perform any joins and aggregations. The goal in choosing a table distribution style is to minimize the impact of the redistribution step by loca

    tgk
    tgk 2013/08/26
    distribution key選択の観点は1)各ノードに均等配分する2)JOIN相手と同じノードに配分する。たまたRedshiftはパーティショニングをサポートしない(代わりにsort keyでpartition elimination的なことをするのか)