Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA35818 for ; Mon, 3 Apr 2000 10:32:42 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA20163; Mon, 3 Apr 2000 10:32:06 -0400 (EDT) To: "Alexey V. Meledin" cc: pgsql-sql@postgresql.org Subject: Re: planner complaints (was approve VKPts5 unsubscribe pgsql) In-reply-to: <3658.000403@webclub.ru> References: <006c01bf9d2b$bc6bd000$020018ac@zke.com.pl> <3658.000403@webclub.ru> Comments: In-reply-to "Alexey V. Meledin" message dated "Mon, 03 Apr 2000 15:48:05 +0400" Date: Mon, 03 Apr 2000 10:32:06 -0400 Message-ID: <20160.954772326@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200004/18 "Alexey V. Meledin" writes: > What mean "???" at (**). It's probably a MATERIALIZE node. The 6.5 explain-printer didn't have code to recognize MATERIALIZE, so it prints like that. (Fixed for 7.0.) > Not optimal way I think Possibly not. It's hard to tell when you evidently have never vacuumed your database. Those tiny row counts and near-zero costs are presumably bogus ... but if the planner thinks those tables are small, it's going to generate plans accordingly. You need to run a VACUUM, or preferably VACUUM ANALYZE, to update the statistics the planner needs. > 2. I've replace btree indexes on relation > AND atd.ifs_data_id = def.ifs_data_id; > with: > create index itd_hash_data_id on ifs_tree_default USING HASH (ifs_data_id); > create index iatd_hash_data_id on ifs_account_tree_data USING HASH (ifs_data_id); Why would you do that? The hash index method doesn't have any advantage over btree that I can see, and it's got a lot of disadvantages. regards, tom lane