I want to mark some records (in a related table) type ‘cash’, some ‘cash4pledge’, and some ‘pledge’.
Can I use the LIKE operator in a relationship to show all records of type cash or cash4pledge, and is it an ‘expensive’ operation? In this case, I’d be finding * like blah%
relationship:
contacts…receipts
pk_contact = fk_contact
cash_calc LIKE type
It depends what your perception of “waiting” is, and how big the database is.
If you’re using decent hardware, shouldn’t take more than 1 or 2 seconds to search through a couple of million rows. The foundsetUpdater should be able to update a foundset of 20,000 in about another second or two.
If you have a like clause where the percent is at the end of the token (s%) rather than the beginning (%s), an index can be used to satisfy a query. If you have a % at the beginning of the token (%s), the database server will have to look up each value in the table which can be expensive depending on the optimizations used, data in the database etc.