Changes between Version 24 and Version 25 of DeveloperGuidelines/Optimisation
- Timestamp:
- 06/16/10 18:54:49 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Optimisation
v24 v25 43 43 ---- 44 44 {{{ 45 value = db(table.id ==id).select(table.field, limitby=(0, 1))[0]45 value = db(table.id == id).select(table.field, limitby=(0, 1)).first() 46 46 }}} 47 47 runs 1.5x faster than: … … 50 50 }}} 51 51 (0.012 vs. 0.007 seconds vs in a test case) 52 53 NB If only expecting one record then the limitby provides a big speedup! 52 54 53 55 Javascript string concatenation: