This is ok for small datasets. No way to make it scale.
I would use some tricks using ListPropery. On GAE really everything
depends on details.

On Jan 15, 3:34 am, toan75 <toa...@gmail.com> wrote:
> Thank mdipierro.
> But i want use "find" on GAE:
>         rows = db(db.cat.id>0).select()
>         rows = rows.find(lambda row:row.name.startswith("C")))
>         rows = rows.sort(lambda row:row.name)
>         rows = rows[1:10]
>
> replace this code on RDBS: rows = db(db.cat.name.like("C%")).select
> (orderby=db.cat.name,limitby=(1,10)) ?
>
> On Jan 15, 2:14 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > This
>
> > rows = db(db.cat.id>0).select(orderby=db.cat.name,limitby=(1,10))
>
> > works on GAE and it is fast.
>
> > mind that you should start counting at 0, not 1.
>
> > On Jan 15, 12:44 am, toan75 <toa...@gmail.com> wrote:
>
> > > On RDBS, i have code:
> > >         rows = db(db.cat.id>0).select(orderby=db.cat.name,limitby=(1,10))
> > > but on GAE:
> > >         rows = db(db.cat.id>0).select()
> > >         rows = rows.sort(lambda row:row.name)
> > >         rows = rows[1:10]
> > > It spend long time in a large datasets.
> > > Is there some other way i can use to make the performance?
>
> > > Regards,
> > > Toan.
>
> > > On Jan 15, 12:30 pm, "mr.freeze" <nat...@freezable.com> wrote:
>
> > > > WebGrid can handle large datasets as it limits the query by the page
> > > > size if the datasource is a Set or Table(s).  The performance hit will
> > > > come in when the filter row is enabled since each filter is a query
> > > > for all distinct values in a field. I would try disabling the filter
> > > > row with:
>
> > > > grid.enabled_rows.remove('filter')
>
> > > > On Jan 14, 9:12 am, Johann Spies <johann.sp...@gmail.com> wrote:
>
> > > > > Is web2py suitable if I want to work with large datasets?
>
> > > > > I am currently developing a database and want to use web2py to make it
> > > > > available to the client.
>
> > > > > Up to now I was using the shell and appadmin interfaces to the 
> > > > > databasis.
>
> > > > > When trying out thewebgrid-slice 
> > > > > fromhttp://www.web2pyslices.com/main/slices/take_slice/39andalsothe
> > > > > "Quick Table Management Snippet" 
> > > > > fromhttp://www.web2pyslices.com/main/slices/take_slice/42todevelopan
> > > > > interface to one of the tables containing about 168800 records python
> > > > > used up all the resources on my  computer (more than 3.4G of memory)
> > > > > and I had to kill the process.
>
> > > > > In both cases I referred to the table as the datasource.
>
> > > > > What I do not understand is that in the appadmin interface I do not
> > > > > have the same problem.
>
> > > > > How do I prevent web2py loading whole dataset into memory?  After all
> > > > > what is the use of a sql database if the everything is loaded into
> > > > > RAM?
>
> > > > > Regards
> > > > > Johann
>
>
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to