Re: Probleme mit sehr langsamen Left Outer Join
Andreas Kretschmer <[email protected]> Wed, 2 Mar 2016 08:55:20 +0100
| Newsgroups | gmane.comp.db.postgresql.german |
|---|---|
| Message-ID | <20160302075520.GA10223@tux> |
Robert J. Rotter <[email protected]> wrote: > > Hi, sorry der EXPLAIN ANALYZE hat ein wenig länger gedauert. Gute 57 > Stunden. Wie sind denn schema2.c2 und schema1.e1 aufgebaut? Warum der Cast hier: (c.cid)::text = (eci.cid)::text Ich würde mal einen Index auf (c.cid,c.rid) und (eci.cid,eci.rid) setzen, falls da keiner ist. Deine 57 Stunden stecken hier: > -> Merge Join (cost=43883.15..28736387.35 rows=3332833000 > width=157) > (actual time=153.804..206956782.687 rows=40063581 loops=1) > Merge Cond: (((c.cid)::text = (eci.cid)::text) AND (c.rid = > eci.rid)) actual time: 206956782, das is in ms, also 206956 Sekunden, das sind über 57 Stunden. Da ist auch eine grobe Verschätzung drin, läuft Dein Autovacuum? (rows=3332833000 -> actual rows=40063581) Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknown) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889° -- Sent via pgsql-de-allgemein mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-de-allgemein