you should check where is the bottleneck, I see three places:
- select: try to print the select statement (call _select, see 
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Generating-raw-sql)
 
and check it on sqlite.
- as_list, split it from the select 
- simplejson
Adding few print statements will give you some light.

Mind that gluon.contrib.simplejson  is no longer necessary 
(https://github.com/web2py/web2py/blob/master/gluon/contrib/simplejson.py), 
import json instead.


Paolo 

On Monday, March 20, 2017 at 5:05:12 PM UTC+1, John Philip wrote:
>
> Hi there,
>
> I have two tables that I have queried using an inner join the query 
> outputs about 50,000 + records this is no problem on sqlite however it does 
> not seem to load on web2py. Is there something I am doing wrong?
>
>
> import json
> def get_dpc():
>     rows = 
> db(db.plf.PLF_NAME==db.pcf.PCF_NAME).select(db.plf.PLF_NAME,db.pcf.PCF_DESCR).as_list()
>     return dict(dpc_list=gluon.contrib.simplejson.dumps(rows))
>
>
>
> any help would be greatly appreciated.
>
> regards,
>
> John
>

-- 
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.

Reply via email to