Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Filter-Pros and Cons

Status
Not open for further replies.

bpratl

Programmer
Jul 7, 2002
25
US
What are the Pro's and Con's of using "Set Filter to" to load selected data to a grid on a form? Is it beter to use SQL instead?
Bob
 
I like to use set filter, only on a small record set. I once defined that as a few hundred record, but with memory and cpu speed much greater I now go up to a 1,000 records with set filter. Anything greater, in my opinion, is case by case.

In summary, set filter is powerful, but has performance limitations on large tables.



Jim Osieczonek
Delta Business Group, LLC
 
Bob,

Regardless of whether you use a filter or a SELECT, the most important thing is to make sure there is an index on all fields on which the filtering is based. If you do, both techniques will give good performance; if there is no index and you have a large number of records, you will get poor performance with both methods.

There might be some additional performance gain for one method over the other, but it is likely to be insignficant compared to the gain you will get from indexing. I would say that you should go for whichever approach fits in most comfortably with your code.

Mike


Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top