Omi, We tried the solution that you have mentioned using join provided
by web2py, it works fine on local server.

But when we run it in google appengine sandbox or deploy it using
google app engine it gives the error "Too many tables in the query".
Is there a solution to resolve this? Is there any other way of
implementing joins on google app engine which increases the
performance?


On Feb 9, 8:25 pm, Omi Chiba <ochib...@gmail.com> wrote:
> > Also will it possible for me put filters on table 1(say Employees) and> 
> > then perform join with othertables?
>
> I'm not sure. I think it's more like join then filter.
> Something like below...
>
> query = (db.person.id==db.dog.owner) & (db.person.name.like('Omi%'))
> rows = db(query).select()
>
> On Feb 9, 8:53 am, Sonal_b <sonalba...@gmail.com> wrote:
>
>
>
> > Thanks Omi.
>
> > I will give it a try.
>
> > Also will it possible for me put filters on table 1(say Employees) and
> > then perform join with othertables?
>
> > On Feb 9, 7:34 pm, Omi Chiba <ochib...@gmail.com> wrote:
>
> > > Sound like you're looping all the records to connect different table.
> > > I use join for the purpose and working fine though I only have about
> > > 10000 records.
>
> > >http://www.web2py.com/books/default/chapter/29/6?search=join#Inner-joins
>
> > > On Feb 9, 8:19 am, Sonal_b <sonalba...@gmail.com> wrote:
>
> > > > I have to query 3tableswhich contains large number ofdata
>
> > > > I have to come up with report which displays
>
> > > > Employee Firstname, Lastname, Manager's FirstName, Manager's Lastname
> > > > and Organisation name.
>
> > > > Table Structure/Details:
>
> > > > 1. Employee table: which contains employee information(First name,
> > > > lastname), Organisation id and manager's id.
> > > > 2. Manager Table: Which contains firstname, lastname etc.
> > > > 3. Organisation table: which contains organisation's name.
>
> > > > The process i follow is:
> > > > 1.Fetchall the employees
> > > >    1.a for each employee get the manager id
> > > >        1.b  For the manager id get the manager's firstname and
> > > > lastname by querying the Manager table
> > > >     1.c for each employee get the organisation id
> > > >      1.d For each organisation id get the Organisation name by
> > > > querying the Organisation table.
>
> > > > When I try tofetchthe records from 3tablesfollowing the above
> > > > approach, I get deadlineexceedederror as my request could not complete
> > > > in 30 seconds time.
>
> > > > Please suggest a betterwayto do this. Also what should i use which
> > > > can improve performance and also get me the result in the 30 second
> > > > timeframe.

Reply via email to