pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Odd error message (" hash indexes do not support whole-index scans")
3+ messages / 2 participants
[nested] [flat]

* Odd error message (" hash indexes do not support whole-index scans")
@ 2005-04-20 15:23 Marinos Yannikos <mjy@geizhals.at>
  2005-04-20 16:02 ` Re: Odd error message (" hash indexes do not support whole-index scans") Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Marinos Yannikos @ 2005-04-20 15:23 UTC (permalink / raw)
  To: pgsql-sql

Shouldn't PostgreSQL behave in a different way in this case? (e.g. just 
not use the index):

                                           Table "public.forum_messages"

  message_id          | integer                  | not null default 
nextval('forum_messages_message_id_seq'::text)
  parent_userid       | integer                  |
  supersededby        | integer                  | default 0

     "forum_messages_pkey" primary key, btree (message_id)
     "idx_supersede" hash (supersededby) WHERE (supersededby > 0)


#  select m1.message_id,m2.message_id,m1.parent_userid,m2.parent_userid 
from forum_messages m1, forum_messages m2 where 
m2.supersededby=m1.message_id and m2.supersededby>0;
ERROR:  hash indexes do not support whole-index scans

Regards,
  Marinos




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Odd error message (" hash indexes do not support whole-index scans")
  2005-04-20 15:23 Odd error message (" hash indexes do not support whole-index scans") Marinos Yannikos <mjy@geizhals.at>
@ 2005-04-20 16:02 ` Tom Lane <tgl@sss.pgh.pa.us>
  2005-04-22 02:08   ` Re: Odd error message (" hash indexes do not support whole-index Marinos Yannikos <mjy@geizhals.at>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2005-04-20 16:02 UTC (permalink / raw)
  To: Marinos Yannikos <mjy@geizhals.at>; +Cc: pgsql-sql

Marinos Yannikos <mjy@geizhals.at> writes:
> Shouldn't PostgreSQL behave in a different way in this case? (e.g. just 
> not use the index):

Good catch.  But why are you using a hash index for this?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Odd error message (" hash indexes do not support whole-index
  2005-04-20 15:23 Odd error message (" hash indexes do not support whole-index scans") Marinos Yannikos <mjy@geizhals.at>
  2005-04-20 16:02 ` Re: Odd error message (" hash indexes do not support whole-index scans") Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-04-22 02:08   ` Marinos Yannikos <mjy@geizhals.at>
  0 siblings, 0 replies; 3+ messages in thread

From: Marinos Yannikos @ 2005-04-22 02:08 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql

Tom Lane wrote:
> Good catch.  But why are you using a hash index for this?

Just experimenting - I was trying to determine whether a hash index 
would give better performance - the values are always unique except when 
they're 0 and < > relations are never needed. That particular query 
would have been needed only once for maintainance work.

Regards,
  Marinos



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-04-22 02:08 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-04-20 15:23 Odd error message (" hash indexes do not support whole-index scans") Marinos Yannikos <mjy@geizhals.at>
2005-04-20 16:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-04-22 02:08   ` Re: Odd error message (" hash indexes do not support whole-index Marinos Yannikos <mjy@geizhals.at>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox