Travamento na criação de ín dices

Neto pr <[email protected]>
Newsgroups gmane.comp.db.postgresql.brasil
Message-ID <CA+wPC0MRzxe8ZgUB0GFHRi7C+jxUaEMeONKRftujyMUU4CgZ+g__49998.8072821454$1507638334$gmane$org@mail.gmail.com>
Olá pessoal

Meu cenário é: postgresql 10, Processador Xeon 2.8GHz/4-core- 8gb Ram, SO
Debian 8.

Ao criar indices em uma tabela de +- 10GB de dados o SGBD trava (eu acho),
pois mesmo depois de esperar 10 horas não houve retorno do comando.
Aconteceu criando índices Hash e índices B+ tree. No entanto, para algumas
colunas, foi com sucesso (L_RETURNFLAG, L_PARTKEY).
O ambiente de dados que estou me referindo é a tabela LINEITEM (benchmark
TPC-H) do link [1] abaixo. As colunas/indices que travaram na criação
foram:
* Índice Hash em: L_TAX
( Índice Btree em: L_RECEIPTDATE.

Se alguém tiver uma dica de como proceder para agilizar a criação de
índices, de forma que seja concluído com sucesso. Sei que o PostgreSQL 10
tem alguns recursos de paralelismo e como meu servidor é dedicado somente
para o SGBD, será que alterar os parâmetros: force_parallel_mode,
max_parallel_workers_per_gather poderia agilizar a criação de índices em
tabelas grandes?
Qualquer dica é bem vinda.

DDL TABELA:
CREATE TABLE LINEITEM (
L_ORDERKEY BIGINT NOT NULL, -- references O_ORDERKEY
L_PARTKEY BIGINT NOT NULL, -- references P_PARTKEY (compound fk to PARTSUPP)
L_SUPPKEY BIGINT NOT NULL, -- references S_SUPPKEY (compound fk to PARTSUPP)
L_LINENUMBER INTEGER,
L_QUANTITY DECIMAL,
L_EXTENDEDPRICE DECIMAL,
L_DISCOUNT DECIMAL,
L_TAX DECIMAL,
L_RETURNFLAG CHAR(1),
L_LINESTATUS CHAR(1),
L_SHIPDATE DATE,
L_COMMITDATE DATE,
L_RECEIPTDATE DATE,
L_SHIPINSTRUCT CHAR(25),
L_SHIPMODE CHAR(10),
L_COMMENT VARCHAR(44),
        PRIMARY KEY (L_ORDERKEY, L_LINENUMBER)
1- http://kejser.org/wp-content/uploads/2014/06/image_thumb2.png

[]'s Neto

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Livre
de vírus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>.
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.