This is the mail archive of the
rhdb-explain@sources.redhat.com
mailing list for the RHDB project.
Bug with large results
- From: Jeffrey Melloy <jmelloy at visualdistortion dot org>
- To: rhdb-explain at sources dot redhat dot com
- Date: Thu, 21 Oct 2004 21:22:09 -0500
- Subject: Bug with large results
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)