Select to view content in your preferred language

Correcting Spatial Indexes on layers

3433
14
08-02-2012 10:05 PM
SurajKoneri
Deactivated User
Hi All,

I am supporting ArcGIS applications. Out of 1179 layers we have 179 layers have invalid spatial indexes that causing �??Cannot get Map Layer Spatial Index Statistics�?� error.

Any one can help me to Rebuild/Correct the existing spatial indexes.

Please post the steps to be followed.

Thanks in advance.

Regards,
Suraj
0 Kudos
14 Replies
VinceAngelo
Esri Esteemed Contributor
What version of ArcGIS are you using?

What database is in use? What version of ArcSDE?

Do all the layers have the same geometry storage type?  What geometry type(s) are
present?

Do all the layers have data (rows)?

I don't trust any automated spatial index calculation algorithm, which can't determine
the most important aspect -- the size of spatial envelope in the average query -- but
spatial index size is rarely the most important factor in determining query performance.

-V
0 Kudos
SurajKoneri
Deactivated User
Hi Vangelo,

we are using ArcGIS 9.3.1 and Oracle as database and ArcSDE of version 9.3.

All the layers have data(rows) and following geometry types are there,


  • point

  • Line

  • Polygon

0 Kudos
VinceAngelo
Esri Esteemed Contributor
Geometry storage type is one of SDEBINARY, SDELOB, ST_GEOMETRY, SDO_GEOMETRY
Spatial index statistics are only applicable to the first three.

ArcGIS 9.3 is old enough to be in "Mature" support status, so there is no reason for not
using the terminal 9.3 release, 9.3.1 SP2.  As I recall, there were a number of significant
defects addressed, including some that addressed incorrect automatic grid size calculation
(one of the reasons I always set grid size manually).

- V
0 Kudos
SurajKoneri
Deactivated User
Vangelo Thank you for your help and information.

I have one more thing to get clarified,

Can you please explain  - 1. how to know which Feature layers have worng spatial indexes in SDE?
                                   2. Is there any command to run SDE to find the layers with wrong spatial indexes?
                                            a. If so please let me know the procedure to run it.

Regards,
Suraj
0 Kudos
VinceAngelo
Esri Esteemed Contributor
I've never seen the error you're reporting.  I asked six questions, and
you answered two and a half of them (full credit on the database would
need the version number).  The questions about geometry storage types
are particularly important -- Without answers it's impossible to evaluate
your problem.

There is no command to find layers with wrong indexes.  The error you
are reporting indicates that the command to list *all* layers ('sdelayer
-o describe_long') would fail on the first invalid layer, probably without
reporting which one.  The fallback is to write a script to list each table
and for each one, describe the table (to find the geometry column name)
and then extract the index information ('sdelayer  -o describe_long
-l table,column') and then if that fails, you'll at least know which ones are
causing failures.  But there's still no way to tell what's wrong, and how
to fix it, without more information about the layers (and that might take
multiple SQL commands for each).

At this point, it looks like a call to Tech Support might be your best bet.

- V
0 Kudos
SurajKoneri
Deactivated User
Thanks Vangelo,

The answers i need to provide before i want to get solution to my issue, i am sorry for that.

Here are the answers for your questions,

What version of ArcGIS are you using? - ArcGIS 9.3.1

What database is in use? - Oracle
What version of ArcSDE? - 9.3.1

Do all the layers have the same geometry storage type? - NO
What geometry type(s) are present? - point, Line and Polygon


Do all the layers have data (rows)? - Yes

While running the the command 'sdelayer -o sde_stats' i can get statistics of only few layers and other layers with no statistics are peresent in between.

here is the sample of report when i run this command,

SDEName.FeatureName,SHAPE


ArcSDE 9.3.1  for Oracle10g Build 3074 Fri Nov  5 09:36:48  2010
Layer   Administration Utility
-----------------------------------------------------
Layer 1864 Spatial Index Statistics:
Level 1,   Grid Size 8.88338563393053
|-------------------------------------------------------------------|
| Grid Records: 593                                                 |
| Feature Records: 593                                              |
| Grids/Feature Ratio:  1.00                                        |
| Avg. Features per Grid:  2.84                                     |
| Max. Features per Grid: 21                                        |
| % of Features Wholly Inside 1 Grid: 100.00                         |
|-------------------------------------------------------------------|
|               Spatial Index Record Count By Group                 |
| Grids:      <=4    >4    >10    >25    >50    >100   >250   >500  |
|---------- ------ ------ ------ ------ ------ ------ ------ ------ |
| Features:    593      0      0      0      0      0      0      0 |
| % Total:     100%     0%     0%     0%     0%     0%     0%     0%|
|-------------------------------------------------------------------|

SDEName.FeatureName1,SHAPE


ArcSDE 9.3.1  for Oracle10g Build 3074 Fri Nov  5 09:36:48  2010
Layer   Administration Utility
-----------------------------------------------------
Error: Network I/O error (-10).
Error: Cannot get Map Layer Spatial Index Statistics for the layer
SDEName.FeatureName1,SHAPE


-Suraj
0 Kudos
VinceAngelo
Esri Esteemed Contributor
Finally, we've captured the real error, and it falls clearly into the question
that you only half-answered: Error: Network I/O error (-10).

I expect that you're not using a supported release of Oracle 10g.  10.2.0.1
is only the base release, and its know to fail with bizarre errors all the time,
so it is not supported by any Esri product.  It must be patched to at least
10.2.0.3 before it becomes even nominally reliable, and for security's sake,
you should be using 10.2.0.4 (with the terminal security patches before
10gR2 was de-supported), or better, moving up to a supported 11gR1 or
11gR2 (which would require a different release of ArcSDE [for 11g]). 

You should also be sure that you've applied 9.3.1 SP2 to both ArcGIS and
ArcSDE and the 3-4 required ArcSDE patches released thereafter.

You never did answer the geometry storage type, which I requested three
times, and must be in the set {SDEBINARY, SDELOB, ST_GEOMETRY,
SDO_GEOMETRY}, not {Point, Line, Polygon}.  If, after you have patched
your database release into stability, you continue to have problems, they
will likely be due to Oracle's deprecation of the LONG RAW used by ArcSDE's
SDEBINARY storage type (you won't be able to upgrade to 11g until you
transition the SDEBINARY to SDELOB).

- V
0 Kudos
SurajKoneri
Deactivated User
Vangelo i was not sure about the geometry types you asked for, So i could not provide it.

The Geometry type of the Feature layers are "ST_Geometry".

Can you please elaborate on the error [Error: Network I/O error (-10)] previous post, why this error we get while getting statistics on the SDE.

Upgrading of Oracle is under progress, After this upgradation which is supported by ESRI these errors will not occur. Am i correct?

Warm regards,
Suraj
0 Kudos
VinceAngelo
Esri Esteemed Contributor
SE_NET_FAILURE is most often returned when the gsrvr application
crashes, usually due to platform instability.

It's unlikely that Oracle will spontaneously crash if you are using a
patchset supported by Esri, but that does not preclude other errors.
If you choose not to move up to an ArcSDE 10.x release, you should
certainly be using 9.3.1 SP2 with the three or four patches released
after SP2.

- V
0 Kudos