Monday, July 29, 2013

Re: or-ing to QuerySets turns INNER into LEFT OUTER joins?

Hi Martin,

Am 2013-07-26 20:48, schrieb Martin J. Laubach:
> This is rather unusual. A join in the database should be quite a bit faster than
> doing things manually, except if the joined tables produce massive amounts of data. This
> suggests that you're missing useful indexes and/or statistics for your query.

Could you please elaborate a bit?

As I mentioned earlier, I'm no SQL/database expert. When I run the queries individually,
they're all reasonably fast, even though all of them have several thousand rows, and the
ERFASST table even has several millions. So I concluded that the proper indexes were
already in place.

I've also talked to our DB admins, who ran the full query through some Oracle
auto-optimizer tool, but said that it only suggested to add more indexes that, when
tried out, did not seem to buy anything.

Anything else that I should look into or steps to take?

Best regards,

Dipl.-Inf. Carsten Fuchs

Carsten Fuchs Software
Industriegebiet 3, c/o Rofu, 55768 Hoppstädten-Weiersbach, Germany
Internet: | E-Mail:

Cafu - the open-source game and graphics engine for multiplayer 3D action

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment