[web2py] Re: DAL Limitations with aggregate and union queries

2012-02-10 Thread BrendanC
>> Here "*request*" is a user requesting a page, not your application making a query to the database. >> OK - now that clears up my confusion and it all makes sense- guess I was having a YASM (yet another senior moment) here. (So used to thinking in terms of http requests it's easy to forget

Re: [web2py] Re: DAL Limitations with aggregate and union queries

2012-02-10 Thread Niphlod
@mcm : I was replying to BrendanC. On cluster indexes: retried, getting slighly better resultsthis timings don't get into account the actual "CLUSTER" operation, only the queries fired after having the table reindexed. method1 : 20.4900407235 method2 : 4.55434324348 method3 : 5.3219832108

Re: [web2py] Re: DAL Limitations with aggregate and union queries

2012-02-10 Thread Michele Comitini
Niphold, Thanks for the reply. My first question is about this: http://www.postgresql.org/docs/8.1/static/sql-cluster.html. Sorry if I did not explicit about what I was referring, as it is postgresql specific. I was wondering if you would see different figures or not, because order by is influe

[web2py] Re: DAL Limitations with aggregate and union queries

2012-02-10 Thread Niphlod
just take a look to http://web2py.com/book/default/chapter/06#Connection-pooling for understanding how DAL handles connections. Your initial question was a concern on speed on aggregate and unions, and the script you provided clearly use one and only one db connection. I'm sorry if I misunders

Re: [web2py] Re: DAL Limitations with aggregate and union queries

2012-02-10 Thread Michele Comitini
Niphlod, Just out of curiosity. Is the dal connection pooled? If in postgres you CLUSTER on the salary index do figures change? mic 2012/2/10 BrendanC : > Niphlod, > Thanks (belatedly) for your valuable  contribution and  your test results. >  The only thing missing from your test is contention

[web2py] Re: DAL Limitations with aggregate and union queries

2012-02-09 Thread BrendanC
Niphlod, Thanks (belatedly) for your valuable contribution and your test results. The only thing missing from your test is contention for database resources/connections and that is what prompted my initial question. In the past I worked on a client server application where we had performance

[web2py] Re: DAL Limitations with aggregate and union queries

2012-02-05 Thread Massimo Di Pierro
+1 On Feb 5, 3:20 pm, Simon Lukell wrote: > As a 'bystander', I personally think that Niphlod's response is of > such good quality that the gist of it deserves inclusion in the book.

[web2py] Re: DAL Limitations with aggregate and union queries

2012-02-05 Thread Simon Lukell
As a 'bystander', I personally think that Niphlod's response is of such good quality that the gist of it deserves inclusion in the book.

[web2py] Re: DAL Limitations with aggregate and union queries

2012-02-05 Thread Niphlod
well, same old, same old sorry for the introduction, but I work as a DBA and query tuning/optimization is in front of my eyes for more than 8 hours a day ;-) The first thing you learn in this job is try. The second is try. The third is try. The fourth is "understand the complexity". The fifth