Re: Style formating of multiline query, advise

2009-03-23 Thread someon
On Mar 19, 10:26 am, Marco Mariani wrote: > someone wrote: > >> Also, for SQL, (A) why are you using nested joins?, and > > > inner select produce smaller set which is then joined with other > > table, kind a optimization > > Did you time it? I've did explain on both kinds of query (with nested s

Re: Style formating of multiline query, advise

2009-03-19 Thread someone
On Mar 19, 10:26 am, Marco Mariani wrote: > someone wrote: > >> Also, for SQL, (A) why are you using nested joins?, and > > > inner select produce smaller set which is then joined with other > > table, kind a optimization > > Did you time it? > I've done some "kind of a optimization" that slowed q

Re: Style formating of multiline query, advise

2009-03-19 Thread Marco Mariani
someone wrote: Also, for SQL, (A) why are you using nested joins?, and inner select produce smaller set which is then joined with other table, kind a optimization Did you time it? I've done some "kind of a optimization" that slowed queries by tenfold, because postgres didn't need my advice,

Style formating of multiline query, advise

2009-03-19 Thread someone
Hi, what is good :) style for multiline queries to database? Is that one ok? query = """ SELECT * FROM ( SELECT a.columna, a.columnb, a.iso FROM all a WHERE (a.name = LOWER(%s)) ) AS c JOIN other as b on c.gid = b.id

Re: Style formating of multiline query, advise

2009-03-18 Thread someone
On Mar 18, 5:56 pm, Scott David Daniels wrote: > someone wrote: > > what is good :) style for multiline queries to database?... > > query = """ SELECT * FROM ( > >                    SELECT a.columna, a.columnb, a.iso > >                       FROM all a > >                       WHERE (a.name = L

Re: Style formating of multiline query, advise

2009-03-18 Thread Steve Holden
Scott David Daniels wrote: > someone wrote: >> what is good :) style for multiline queries to database?... >> query = """ SELECT * FROM ( >>SELECT a.columna, a.columnb, a.iso >> FROM all a >> WHERE (a.name = LOWER(%s)) ) AS c >>

Re: Style formating of multiline query, advise

2009-03-18 Thread Scott David Daniels
someone wrote: what is good :) style for multiline queries to database?... query = """ SELECT * FROM ( SELECT a.columna, a.columnb, a.iso FROM all a WHERE (a.name = LOWER(%s)) ) AS c JOIN other as b on c.gid = b.id

Re: Style formating of multiline query, advise

2009-03-18 Thread someone
On Mar 18, 4:04 pm, Tino Wildenhain wrote: > John Machin wrote: > > On Mar 18, 11:25 pm, someone wrote: > >> Hi, > > >> what is good :) style for multiline queries to database? > >> Is that one ok? > >> query = """ SELECT * FROM ( > >>                    SELECT a.columna, a.columnb, a.iso > >>  

Re: Style formating of multiline query, advise

2009-03-18 Thread someone
On Mar 18, 2:51 pm, John Machin wrote: > On Mar 18, 11:25 pm, someone wrote: > > > Hi, > > > what is good :) style for multiline queries to database? > > Is that one ok? > > query = """ SELECT * FROM ( > >                    SELECT a.columna, a.columnb, a.iso > >                       FROM all a

Re: Style formating of multiline query, advise

2009-03-18 Thread Tino Wildenhain
John Machin wrote: On Mar 18, 11:25 pm, someone wrote: Hi, what is good :) style for multiline queries to database? Is that one ok? query = """ SELECT * FROM ( SELECT a.columna, a.columnb, a.iso FROM all a WHERE (a.name = LOWER(%s)

Re: Style formating of multiline query, advise

2009-03-18 Thread John Machin
On Mar 18, 11:25 pm, someone wrote: > Hi, > > what is good :) style for multiline queries to database? > Is that one ok? > query = """ SELECT * FROM ( >                    SELECT a.columna, a.columnb, a.iso >                       FROM all a >                       WHERE (a.name = LOWER(%s))  ) AS