3

I do not have access to DDL / write access of the database. How do I check if existing geometry columns have spatial indexing implemented or not?

1 Answer 1

4

You can find a list of all indexes on a table with:

SELECT indexname, indexdef FROM pg_indexes WHERE tablename = 'name' AND schemaname = 'schema';

which will give a result like:

"brownsh_pkey"  "CREATE UNIQUE INDEX brownsh_pkey ON boundaries.brownsh USING btree (ogc_fid)"
"brownsh_geom_idx"  "CREATE INDEX brownsh_geom_idx ON boundaries.brownsh USING gist (wkb_geometry)"
"brownsh_pk"    "CREATE UNIQUE INDEX brownsh_pk ON boundaries.brownsh USING btree (ogc_fid)"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.