Opened 2 years ago

Last modified 11 months 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:



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 Changed 2 years ago by robe

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 Changed 19 months ago by pramsey

Milestone: PostGIS 2.5.4PostGIS 2.5.5

comment:3 Changed 14 months ago by robe

Milestone: PostGIS 2.5.5PostGIS 3.0.3

comment:4 Changed 11 months ago by robe

Milestone: PostGIS 3.0.3PostGIS 3.2.0

comment:5 Changed 11 months ago by robe

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