From: Fernando Nasser <fnasser@redhat.com>
To: Jeffrey Melloy <jmelloy@visualdistortion.org>
Cc: rhdb-explain@sources.redhat.com
Subject: Re: Bug with large results
Date: Fri, 22 Oct 2004 13:55:00 -0000 [thread overview]
Message-ID: <4179116A.8000409@redhat.com> (raw)
In-Reply-To: <2CDEED12-23D1-11D9-A663-000393C79B3C@visualdistortion.org>
Hi Jeffrey,
It is not the size of the result. It happens that a new type of node
was added to the 7.4 version after we had released this version.
There is a patch, posted to this list, by Peter Eisentraut, that
provides a workaround for this (it does not add the new nodes but
prevents the NPE).
I did not incorporate it as I keep expecting someone will send a patch
that includes code for all the new nodes, or that I myself find the time
to do it. In any case, it should not throw exception if a unknown type
of node is found, just print a warning or something.
If you have problems obtaining it from the list archives or rebuilding
rhdb-explain please send me a note and I will try and help.
Regards,
Fernando
Jeffrey Melloy wrote:
> I downloaded RHDB-explain (CVS) and stumbled across a bug.
>
> Small queries work fine, but a larger plan will fail with a null
> pointer exception.
>
> Using PostgreSQL 7.4.5 on OS X.
>
> Thanks,
> Jeff
>
> Error:
> java.lang.NullPointerException
> at
> com.redhat.rhdb.explain.ExplainParserV73.addQual(ExplainParserV73.java:
> 796)
> at
> com.redhat.rhdb.explain.ExplainParserV73.buildExplainTree(ExplainParserV
> 73.java:343)
> at
> com.redhat.rhdb.explain.ExplainParserV73.explain(ExplainParserV73.java:
> 187)
> at
> com.redhat.rhdb.explain.Explain$ExplainThread.run(Explain.java:298)
>
>
> Query:
> select * from message_v;
>
> plan:
> QUERY PLAN
> ------------------------------------------------------------------------
> -----------------------------------
> Hash Join (cost=34961.26..3454046.29 rows=155607 width=164)
> Hash Cond: ("outer".sender_id = "inner".user_id)
> Join Filter: (("inner".effdate <= "outer".message_date) AND (NOT
> (subplan)))
> -> Hash Join (cost=34923.29..2628055.36 rows=50978 width=115)
> Hash Cond: ("outer".recipient_id = "inner".user_id)
> Join Filter: (NOT (subplan))
> -> Merge Join (cost=34916.77..50555.99 rows=297841 width=105)
> Merge Cond: ("outer".user_id = "inner".recipient_id)
> Join Filter: ("outer".effdate <= "inner".message_date)
> -> Sort (cost=46.03..47.35 rows=526 width=39)
> Sort Key: r_disp.user_id
> -> Seq Scan on user_display_name r_disp
> (cost=0.00..22.26 rows=526 width=39)
> -> Sort (cost=34870.74..35279.24 rows=163399 width=66)
> Sort Key: m.recipient_id
> -> Seq Scan on messages m (cost=0.00..6361.99
> rows=163399 width=66)
> -> Hash (cost=5.81..5.81 rows=281 width=26)
> -> Seq Scan on users r (cost=0.00..5.81 rows=281
> width=26)
> SubPlan
> -> Index Scan using im_display_user on user_display_name
> udn (cost=0.00..8.64 rows=1 width=0)
> Index Cond: (user_id = $4)
> Filter: ((effdate > $3) AND (effdate <= $2))
> -> Hash (cost=36.66..36.66 rows=526 width=65)
> -> Hash Join (cost=6.51..36.66 rows=526 width=65)
> Hash Cond: ("outer".user_id = "inner".user_id)
> -> Seq Scan on user_display_name s_disp
> (cost=0.00..22.26 rows=526 width=39)
> -> Hash (cost=5.81..5.81 rows=281 width=26)
> -> Seq Scan on users s (cost=0.00..5.81 rows=281
> width=26)
> SubPlan
> -> Index Scan using im_display_user on user_display_name udn
> (cost=0.00..8.64 rows=1 width=0)
> Index Cond: (user_id = $1)
> Filter: ((effdate > $0) AND (effdate <= $2))
> (31 rows)
>
>
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
prev parent reply other threads:[~2004-10-22 13:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-22 2:22 Jeffrey Melloy
2004-10-22 13:55 ` Fernando Nasser [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4179116A.8000409@redhat.com \
--to=fnasser@redhat.com \
--cc=jmelloy@visualdistortion.org \
--cc=rhdb-explain@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).