Select to view content in your preferred language

reindex using "reindex" command in postgresql

127
3
Jump to solution
10-29-2024 08:22 PM
yockee
by
Frequent Contributor

How to reindex feature class that just been loaded into postgresql ? I load the data using Append tool.

I know I can use "rebuild Indexes (Data Management)".

But, can I use Postgresql command such as

"REINDEX (verbose, concurrently)
TABLE dbgis.bnp__attach;"

Note: this table is an attachment that contains blob data. It has 200K+ records and each row has around 1MB of blob (picture)

0 Kudos
1 Solution

Accepted Solutions
VinceAngelo
Esri Esteemed Contributor

Yes, you can manage indexes manually with SQL in pgAdmin, psql, or even arcpy.ArcSDESQLExecute().

- V

View solution in original post

3 Replies
VinceAngelo
Esri Esteemed Contributor

Yes, you can manage indexes manually with SQL in pgAdmin, psql, or even arcpy.ArcSDESQLExecute().

- V

yockee
by
Frequent Contributor

Hi @VinceAngelo do I have to turn off the corresponding map service, stop editing using DML queries and quit any arcgis pro apps that access the feature class during the index rebuild ? 

Thanks

0 Kudos
VinceAngelo
Esri Esteemed Contributor

I never have.  I do run CLUSTER, VACUUM, and REINDEX at quiet times, but "quiet" can be hard to find in 24x7 systems. REINDEX will slow down queries, but not cause them to fail. VACUUM might grab a lock; the docs will say for sure.

- V

0 Kudos