Can we also see what event_pretty does?
On Friday, 22 February 2013 04:15:11 UTC-6, newbie wrote:
>
> I cross-verified and got the same result , timings is 32.00 ms for count
> query.Anyways, please find below the model and controller code:
>
> Model:
>
> db.define_table('table1',
> Field('device', type="reference devices", ondelete="SET NULL"),
> Field('type', 'integer'),
> Field('message', 'string', represent=event_pretty),
> Field('timestamp', 'integer', label="Sensor Time Stamp"),
> Field('seq', 'integer', label="Sequence Number"),
> Field('serverTS', 'string', label="Server Time Stamp"),
> Field('user', type="reference auth_user", ondelete="SET NULL"))
>
> Controller:
>
> @auth.requires_login()
> def index():
> query_table1 = db.table1
> grid = SQLFORM.grid(query=query_table1,
> editable=None,
> deletable=None,
> create=False,orderby=~db.table1.id)
> return dict(grid=grid)
>
>
>
> On Fri, Feb 22, 2013 at 3:26 PM, Niphlod <[email protected]
> <javascript:>>wrote:
>
>> if SQLite takes 32 ms to count 10^5 records, than I'm impressed (or, more
>> likely, astonished) with its performance (but I remain dubious that you're
>> reading the correct timings).
>> Seems that the database is not the issue. Can we see the model for that
>> table ?
>>
>>
>> On Friday, February 22, 2013 10:07:33 AM UTC+1, newbie wrote:
>>
>>> I mentioned wrong data for the query which SQLFORM.grid is executed so
>>> sorry for that, basically that query is taking 0.00 ms and below query has
>>> taken 32.00 ms:
>>>
>>> SELECT count(*) FROM table1 WHERE (table1.id > 0);
>>>
>>>
>>>
>>> On Fri, Feb 22, 2013 at 2:24 PM, Niphlod <[email protected]> wrote:
>>>
>>>> wonderful. thanks.
>>>> @newbie: can you see how many seconds it takes the query that has a
>>>> count() in it ? that one is probably taking more than a few millisec.
>>>>
>>>> PS: SQlite starts to be kinda not the preferred way to store 10^5
>>>> 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.
>>>>
>>>> For more options, visit
>>>> https://groups.google.com/**groups/opt_out<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 [email protected] <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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.