Opened 5 years ago

Last modified 3 years ago

#4385 new enhancement

[raster2pgsql] -I option recreates index for each insertion

Reported by: RaphJ Owned by: Bborie Park
Priority: medium Milestone: PostGIS Fund Me
Component: raster Version: 2.4.x
Keywords: Cc:

Description

raster2pgsql

The "-I" option does not make it clear that it recreates index for each insertion, which leads to poor performance for batch inserts (x10 slower).

I've seen confusion about it on tutorials and on StackOverflow.

Could you please update the doc (man page and onlin) or even disable it (or output a warning) when used together with -a option (append).

Change History (5)

comment:1 by robe, 5 years ago

Milestone: PostGIS 2.5.3PostGIS 2.5.4

By insertion I presume you mean each append run. Not for each individual tile?

I haven't looked at this closely. It should in theory fail if there is already an index on the table. But it's also possible you do several append calls and then on your final commandline call you want to create the index on the table. So seems perfectly legit to allow -I and a together.

Anyway I'll push this to later once I've had time to test out all the scenarios

comment:2 by pramsey, 4 years ago

Milestone: PostGIS 2.5.4PostGIS 2.5.5

comment:3 by robe, 4 years ago

Milestone: PostGIS 2.5.5PostGIS 3.0.3

comment:4 by robe, 3 years ago

Milestone: PostGIS 3.0.3PostGIS 3.2.0

comment:5 by robe, 3 years ago

Milestone: PostGIS 3.2.0PostGIS Fund Me
Note: See TracTickets for help on using tickets.