Re: index question - Mailing list pgsql-general

From Melvin Davidson
Subject Re: index question
Date
Msg-id CANu8FiwXqOcXnbi-QRGu7dKm_N5R7=LPjBQJySNgw4VGAUj3eQ@mail.gmail.com
Whole thread Raw
In response to Re: index question  ("drum.lucas@gmail.com" <drum.lucas@gmail.com>)
List pgsql-general


On Sun, May 1, 2016 at 10:27 PM, drum.lucas@gmail.com <drum.lucas@gmail.com> wrote:
Sorry @Melvin, sent the previous email just to you..


That's a great one, too! Cheers!


Well.. the index creation did not help...

if possible please have a look on the explain analyze results:


What else can I do?

The indexes I created is:
- CREATE INDEX CONCURRENTLY ix_inode_segments_notes_clientids2 ON gorfs.inode_segments USING btree ("full_path");

- CREATE INDEX CONCURRENTLY ix_inodes_checksum_st_size ON gorfs.inodes USING btree ("checksum_md5","st_size");

Two things to consider.
1. Did you remember to run ANALYZE on the table after the new indexes were created?
2. Try doing a
SET enable_seqscan = off;  
before executing the query  and compare execution times.
It might just be that a seqscan would be faster.

--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

pgsql-general by date:

Previous
From: "drum.lucas@gmail.com"
Date:
Subject: Re: index question
Next
From: Evgeny Morozov
Date:
Subject: Re: Allow disabling folding of unquoted identifiers to lowercase