32 ms means 0.0032 seconds. Database is not the issue.
PS: I may be old enough to miss some new-style definitions, but what is 
precisely " 1 lakh records" ?

On Friday, February 22, 2013 8:16:43 AM UTC+1, newbie wrote:
>
> Thanks for your prompt response.
> I am using sqlite database.I placed {{=response.toolbar()}} in view and 
> found that, query which is being used in SQLFORM.grid is taking more time 
> than others.
>
> Please find below the query and time taken to execute:
>
> SELECT  table1.device, table1.user, table1.type, table1.message, 
> table1.seq, table1.timestamp, table1.serverTS, table1.id FROM table1 
> WHERE (table1.id > 0) ORDER BY table1.id DESC LIMIT 20 OFFSET 0;
>
> Time taken to execute = 32.00 ms
>
> here device reference of another table "device" and user is reference of 
> table "auth_user".
>
> Yes I am using pagination and per page 20 records I am showing, so for 
> around 100,000 records it's showing around 5000 pages.
>
>  and all other queries are taking 0.00 ms.
>
> As I am new in web2py developement so not sure how to use offset in 
> SQLFORM.grid to limit the loaded data. So,please guide me to resolve this 
> problem.
>
> Thanks,
>
> On Fri, Feb 22, 2013 at 11:35 AM, Bruno Rocha <rocha...@gmail.com<javascript:>
> > wrote:
>
>> what is your database engine?
>>
>> we need to see if the bottleneck is in database side.
>>
>> Place a {{=response.toolbar()}} in your view and paste here the generated 
>> SQL and timings.
>>
>> Are you using pagination? how many per page? even with 100.000 records, 
>> the grid should use an offset to limit the loaded data.
>>
>>
>>  
>>
>> On Fri, Feb 22, 2013 at 2:56 AM, newbie <neha...@gmail.com 
>> <javascript:>>wrote:
>>
>>> Hi ,
>>>     i am a newbie in Web2py....I have more than 1 lakh records in 
>>> database table1  and i am displaying that table through an SQLFORM.grid.The 
>>> problem is the corresponding WebPage for this table1 is taking more than 15 
>>> seconds to open.Is there a way we can solve this performance 
>>> issue??.....Kindly help......
>>>
>>> Default.py
>>>
>>> def WebPage():
>>>     grid=SQLFORM.grid(db.table1)
>>>     return locals()
>>>
>>> WebPage.html
>>>
>>> {{=grid}}
>>>
>>> and table1 has more than 1 lakh records.
>>>
>>> -- 
>>>  
>>> --- 
>>> 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+un...@googlegroups.com <javascript:>.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>
>>  -- 
>>  
>> --- 
>> 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+un...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 

--- 
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/groups/opt_out.


Reply via email to