Proposal : REINDEX SCHEMA

Поиск
Список
Период
Сортировка
От Sawada Masahiko
Тема Proposal : REINDEX SCHEMA
Дата
Msg-id CAD21AoCiWv1YsF6de9bUE0MDCmfOtkW-w=qpSWM6Ea-7nuaiOQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Proposal : REINDEX SCHEMA
Список pgsql-hackers
Hi all,

Attached WIP patch adds new syntax REINEX SCHEMA which does reindexing
all table of specified schema.
There are syntax dose reindexing specified index, per table and per database,
but we can not do reindexing per schema for now.
So we must use reindexdb command if we want to do.
This new syntax supports it as SQL command.
This use similar logic as REINDEX DATABASE, but we can use it in
transaction block.
Here is some example,

-- Table information
[postgres][5432](1)=# \d n1.hoge
       Table "n1.hoge"
 Column |  Type   | Modifiers
--------+---------+-----------
 col    | integer | not null
Indexes:
    "hoge_pkey" PRIMARY KEY, btree (col)

[postgres][5432](1)=# \d n2.hoge
       Table "n2.hoge"
 Column |  Type   | Modifiers
--------+---------+-----------
 col    | integer |

[postgres][5432](1)=# \d n3.hoge
Did not find any relation named "n3.hoge".

-- Do reindexing
[postgres][5432](1)=# reindex schema n1;
NOTICE:  table "n1.hoge" was reindexed
REINDEX
[postgres][5432](1)=# reindex schema n2;
REINDEX
[postgres][5432](1)=# reindex schema n3;
NOTICE:  schema"n3" does not hava any table
REINDEX

Please review and comment.

Regards,

-------
Sawada Masahiko

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Matthew Woodcraft
Дата:
Сообщение: Re: UPSERT wiki page, and SQL MERGE syntax
Следующее
От: Ronan Dunklau
Дата:
Сообщение: Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)