optimizer

From: "Zhang, Anna" <azhang(at)verisign(dot)com>
To: "'pgsql-admin(at)postgresql(dot)org'" <pgsql-admin(at)postgresql(dot)org>
Subject: optimizer
Date: 2002-02-27 21:01:19
Message-ID: 5511D658682A7740BA295CCF1E1233A635A85F@vsvapostal2.bkup3
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,
I have a table named Domain that has 14M rows, here is the defination:

xdap_regr=# \d domain
Table "domain"
Attribute | Type | Modifier
-----------------+-------+----------
domainhandle | text | not null
domainname | text | not null
parentdomain | text | not null
holdername | text |
street | text |
city | text |
state | text |
postalcode | text |
country | text |
Indices: idx_domain_domainname,
idx_domain_holdername,
idx_domain_parentdoamin,
pk_domain

An index on holdname has been created and the table analized.

xdap_regr=# explain select domainname from domain where holdername =
'NAMEZERO.COM';
NOTICE: QUERY PLAN:

Seq Scan on domain (cost=0.00..483192.89 rows=1532369 width=12)

EXPLAIN

Question: Why optimizer doesn't use index scan? below is some data of
holdername looks like:

xdap_regr=# select holdername form domain limit 10;

holdername
---------------------------------
SE Electronic Control Sys Inc
STONE J. MELET (ASKFORFREE-DOM)
DAVID GUERRA
A Taste of Lake County
DONAHUE SECURITIES
tsui, godwin
OECONSULT
JERRY GRIGORY PHOTOGRAPHY
NAMEZERO.COM
Carla Cross Seminars, Inc.
(10 rows)

Can we force optimizer to index scan?

Thanks a lot!

Anna Zhang

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Arguile 2002-02-27 22:03:09 Re: transactions and cursors......
Previous Message Dan Langille 2002-02-27 20:14:55 Re: transactions and cursors......