Re: [web2py] Re: How to improve performance for db queries

2014-05-22 Thread Anthony
On Thursday, May 22, 2014 10:31:51 AM UTC-4, Sarbjit wrote: > > Yes, In-fact the data is expected to change once in week. > > > Regarding Index on table, I know DAL doesn't provides a direct way of > doing it, my question is once i have created an index on my table, do i > need to modify anythin

Re: [web2py] Re: How to improve performance for db queries

2014-05-22 Thread Sarbjit
Yes, In-fact the data is expected to change once in week. Regarding Index on table, I know DAL doesn't provides a direct way of doing it, my question is once i have created an index on my table, do i need to modify anything in my controller? -Sarbjit On Thursday, May 22, 2014 7:54:54 PM UTC+

Re: [web2py] Re: How to improve performance for db queries

2014-05-22 Thread Kiran Subbaraman
Sarbjit, The index creation is something that you would do on the database. Web2py doesn't have a role to play there. For postgres: http://www.postgresql.org/docs/9.3/static/sql-createindex.html Kiran Subbaraman http://subbaraman.wordpress.com/about/ On

Re: [web2py] Re: How to improve performance for db queries

2014-05-22 Thread Kiran Subbaraman
In addition to this, and assuming that the data doesn't change frequently (days vs minutes), maybe a select-cache, with TTL of 24 hours would help? http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Caching-selects Kiran Subbara

Re: [web2py] Re: How to improve performance for db queries

2014-05-22 Thread Richard Vézina
Do you have index on your table? Richard On Thu, May 22, 2014 at 8:39 AM, Sarbjit wrote: > Hi Anthony, > > Code is almost identical to the code posted in slice with change in field > names and number of records. Only additonal difference is that I am using > "orderby" in the query before retur