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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to