hi, just wondering which is the best approach between using database record or database query in terms of performance? case 1: models customer sale_order
controllers report_customer when i click report customer, i want to have, customer order info something like (total_sale_order, last_sale_order_date, last_payment_type, last_total_paid, total_paid, max_total_paid, min_total_paid, avg_total_paid, last_total_quantity, total_quantity), which is better using database record (add those as new field on table customer) or database query (calculate when access the controller) in term of performance? case 2: models purchase_order sale_order controllers report_income_statement when i click report income statement, i want to have total sale order and total purchase order in this month, , which is better using database record (create new table called income_statement) or database query (calculate when access the controller) in term of performance? any suggestion, opinion or recommendation is welcome thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.