Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've a special question about the effects of RelationshipClasses. For some reasons I've created a Personal Geodatabase and imported two features from Shape-Files and created an own table.

For example we have the following structure

feature_I = ID_K, Cnt, Closed

feature_II = ID_S, Name, Number

Table = ID_X, ID_Y, ID_Z,...

The table contains 101046 rows, the ID_K is equal with ID_X, ID_S is equal with ID_Y and ID_Z. The value of ID_K is at least available twice in the table (ID_X).

Now I've written some algorithms which use cursors to get through the all entries in feature_I. Then the algorithms will look at the table and filter all rows for which the statement ID_K = ID_X is true. For each of this rows two queries are created. This first query delivers the object of the feature_II (ID_Y = ID_S) and the second query will deliver a 2nd object of the feature_II (ID_Z = ID_S).

I've measured the time for the whole operation. The result varies between 80 and 90 min.

Now I've created three RelationshipClasses between the Table and the two features. All are one-to-many relations (ID_K with ID_X, ID_S with ID_Y and ID_Y with ID_Z).

If I rerun the whole algorithm the execution time drops to 19 min.

Now the questions is why? Whats the reason for the increase of performance by accessing the tables in the geodatabase when RelationshipClasses exist?

Thanks for the clarification.

share|improve this question
2  
My guess is in your first test there were no attribute indices, and in your second there were. I think creating a relationship class causes attribute indices to be created on the primary and foreign key columns. You could of course test this without relationship classes by creating the attribute indices manually and see if you get the same results. –  blah238 Feb 22 '13 at 20:22
add comment

1 Answer

up vote 4 down vote accepted

Relationship classes: Maximizing performance describes the indices added when creating a relationship, which would explain a performance increase as you described.

share|improve this answer
    
Thanks for the link. This is the reason for my described behavior. –  FredFloete Feb 23 '13 at 11:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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