Style formating of multiline query, advise

someone petshmidt at
Thu Mar 19 11:01:13 CET 2009

On Mar 19, 10:26 am, Marco Mariani <ma... at> 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 queries by tenfold,
> because postgres didn't need my advice, and knew better. RDBMS

Query itself is fast. I'll try to time it and will report my results
here :)

> performance is non-intuitive, really. If you're using mysql, YMMV,
> because its optimizer is not as good.

That's true, I don't trust optimizer

> > Yes, my original question was about formatting. It's not original
> > query (only a part).
> Try this:
> My 2c: I use textwrap.dedent to strip leading spaces from every line.

textwrap.dedent? What's that? I'm new in python. Will google it.
How do your query formatting looks like then?

More information about the Python-list mailing list