* * * * * * *
Index and Table AccessSeq ScanThe Seq Scan operation scans the entire relation (table) as stored on disk (like TABLE ACCESS FULL). Index ScanThe Index Scan performs a B-tree traversal, walks through the leaf nodes to find all matching entries, and fetches the corresponding table data. It is like an INDEX RANGE SCAN followed by a TABLE ACCESS BY INDEX ROWID operation. See also Chapter 1, “Anatomy o
PostgreSQL には 通常の DISTINCT ではない DISTINCT ON というものがあります。 次のようなテーブルがあるとします。 db1=# SELECT * FROM distinct_test; field1 | field2 | field3 --------+--------+-------- 1 | 4 | 1 1 | 4 | 2 2 | 2 | 1 2 | 2 | 2 3 | -1 | 1 3 | -1 | 2 (6 rows) まずは通常の DISTINCT です。 db1=# SELECT DISTINCT field1, field2 FROM distinct_test; field1 | field2 --------+-------- 1 | 4 2 | 2 3 | -1 (3 rows) この場合、列に指定した field1, field2 の順
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く