Search Postgresql Archives

Re: Refresh Materialized View Issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My question is: what indexes are on public.large_table?  Hopefully there's a compound b-tree index on id1, id2, id3.
There is not, after further investigation.  There are these 4 indexes that involve id1, id2, and id3.  Should I try creating an index on all three of the columns?

CREATE INDEX IF NOT EXISTS idx_large_table_id1
    ON public.large_table USING btree
    (id1 ASC NULLS LAST)
    TABLESPACE pg_default;

CREATE INDEX IF NOT EXISTS idx_large_table_id2
    ON public.large_table USING btree
    (id2 ASC NULLS LAST)
    TABLESPACE pg_default;

CREATE INDEX IF NOT EXISTS idx_large_table_id3
    ON public.large_table USING btree
    (id3 ASC NULLS LAST)
    TABLESPACE pg_default;

CREATE INDEX IF NOT EXISTS idx_large_table_id2_id3
    ON public.large_table USING btree
    (id2 ASC NULLS LAST, id3 ASC NULLS LAST)
    TABLESPACE pg_default;

A materialized view isn't too different from an unlogged table. 
So an unlogged table would also be an appropriate solution?

--


Jeremiah


CONFIDENTIALITY NOTICE: The information contained in this email (and any attachments) is privileged and confidential and protected from disclosure. If you are not the intended recipient of this email or the attachments, be aware that any disclosure, copying, distribution or use of this email or any attachment is strictly prohibited and you should not read the message or read or open any attachment. If you have received this email by mistake, please immediately notify the sender and delete it permanently from your system. Agri Stats, Inc. and its subsidiaries will not be held liable to any person or entity resulting from the unintended or unauthorized use of any information contained in this email.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux