Opened 17 months ago

Last modified 7 weeks ago

#4385 new enhancement

[raster2pgsql] -I option recreates index for each insertion

Reported by: RaphJ Owned by: Bborie Park
Priority: medium Milestone: PostGIS 3.0.3
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 (3)

comment:1 Changed 14 months 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 7 months ago by pramsey

Milestone: PostGIS 2.5.4PostGIS 2.5.5

comment:3 Changed 7 weeks ago by robe

Milestone: PostGIS 2.5.5PostGIS 3.0.3
Note: See TracTickets for help on using tickets.