Hi Carsten, Did you find a fix for this problem? I'm running into the same issue. I am manually doing a union in python to avoid the left outer join. What I would like to know is: 1. Is there a reason why mysql performance is so slow on left outer join? (even with indexes) 2. How do I force django to use a UNION ALL (which is performant) instead of left outer join
On Monday, July 29, 2013 9:09:28 AM UTC-4, Carsten Fuchs wrote: > > 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, > Carsten > > > > -- > Dipl.-Inf. Carsten Fuchs > > Carsten Fuchs Software > Industriegebiet 3, c/o Rofu, 55768 Hoppst�dten-Weiersbach, Germany > Internet: http://www.cafu.de | E-Mail: in...@cafu.de <javascript:> > > 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c31359a9-4bbf-4ea6-a832-f76c1c287261%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.