Why Does Definition Query and Select by Attributes Gives Me Different Results

1012
5
Jump to solution
06-05-2018 01:23 PM
KellyAllen2
New Contributor II

I have created a Select by Attributes query  expression and saved it (.exp file). When I run this query as a new selection on my map layer I get 3924 selected of 11500. See below:

However, if clear my selection and then used the same saved expression as a Definition Query (By selecting the saved query in the Definition Query box)  for the same map layer I get a different number of records selected. See below:

After running the Definition Query I'm only getting 2000 results.

Can anyone explain why the same query on the same data set would produce different output results? 

Reply
0 Kudos
1 Solution

Accepted Solutions
JoshuaBixby
MVP Esteemed Contributor

Hit the Load All button, how many records are retrieved?

View solution in original post

5 Replies
JoshuaBixby
MVP Esteemed Contributor

Hit the Load All button, how many records are retrieved?

View solution in original post

KellyAllen2
New Contributor II

After clicking on the Load All button I do get the correct number of records. Is there a reason why the default isn't to retrieve all the records? Perhaps an initial limit of retrieved records?

JoshuaBixby
MVP Esteemed Contributor

This behavior you are seeing has been around in various forms since ArcGIS 8.x, when working with enterprise geodatabase data.  Are you working with file or enterprise geodatabase data?

KellyAllen2
New Contributor II

It is a file geodatabase. I've not worked with enterprise geodatabase data.

Reply
0 Kudos
MarcoBoeringa
MVP Regular Contributor

This is just normal behaviour. While your dataset may be small and nothing to worry about, just imagine what would happen if ArcGIS would load a 100M records layer of 25GB file size stored in an enterprise geodatabase over your organization's network of 100Mbps... You would be waiting for at least 25000/(100/8)=2000 seconds, so close to 30 minutes / half an hour, before your attribute table would appear. And that assumes you will get the full 100Mbps, which you probably rarely will.

So pulling all records from a large database table is not something you want to customarily do.