Re: [GENERAL] Is there a point to having both a normal gist index and an exclude index?

2017-04-05 Thread Tom Lane
Bruno Wolff III writes: > P.S. Using spgist with version 10 for the exclude index is much faster > than using gist in 9.6. I have run the index creation for as long as > 6 hours and it hasn't completed with 9.6. It took less than 10 minutes > to create it in 10. For this

Re: [GENERAL] Is there a point to having both a normal gist index and an exclude index?

2017-04-05 Thread Bruno Wolff III
On Wed, Apr 05, 2017 at 12:11:09 -0600, Rob Sargent wrote: On 04/05/2017 12:04 PM, Bruno Wolff III wrote: On Wed, Apr 05, 2017 at 00:05:31 -0400, Tom Lane wrote: Bruno Wolff III writes: ... I create both a normal gist index and

Re: [GENERAL] Is there a point to having both a normal gist index and an exclude index?

2017-04-05 Thread Rob Sargent
On 04/05/2017 12:04 PM, Bruno Wolff III wrote: On Wed, Apr 05, 2017 at 00:05:31 -0400, Tom Lane wrote: Bruno Wolff III writes: ... I create both a normal gist index and an exclude index using the following: CREATE INDEX contains ON iplocation USING gist

Re: [GENERAL] Is there a point to having both a normal gist index and an exclude index?

2017-04-05 Thread Bruno Wolff III
On Wed, Apr 05, 2017 at 00:05:31 -0400, Tom Lane wrote: Bruno Wolff III writes: ... I create both a normal gist index and an exclude index using the following: CREATE INDEX contains ON iplocation USING gist (network inet_ops); ALTER TABLE iplocation ADD

Re: [GENERAL] Is there a point to having both a normal gist index and an exclude index?

2017-04-04 Thread Tom Lane
Bruno Wolff III writes: > ... I create both a normal gist index and an exclude index using the > following: > CREATE INDEX contains ON iplocation USING gist (network inet_ops); > ALTER TABLE iplocation > ADD CONSTRAINT overlap EXCLUDE USING gist (network inet_ops WITH &&); >

[GENERAL] Is there a point to having both a normal gist index and an exclude index?

2017-04-04 Thread Bruno Wolff III
I am trying to load a database with about 3.5 million records relating netblocks to locations. I currently don't know whether or not any of the netblocks overlap. If they don't, then I can simplify queries that find the locations of IP addresses. I create the table as follows: DROP TABLE IF