It is relatively expensive. Each choice you make involves moving from context through the model to persistent storage, which in itself implies access to the file. At best, your selection will be as slow as accessing the repository file. In some cases (especially for obtaining large binary BLOBs) this will be much slower. Choose with caution.
However, remember that sampling is not as expensive as an error. You should be more worried about crashes in crashes in access to data than to make additional selections. In addition, running one or more large sets is much cheaper than running many small sets (just as accessing one large file is easier than accessing a hundred small ones).
The best policy is to try to anticipate what data will be needed when developing the application, then pull it out at once or in several large samples and cache as long as you can.
source share