logo       

Re: Queries not using Index: msg#00366

Subject: Re: Queries not using Index
Hi! :)

On Wed, 24 Jul 2002, Christopher Kings-Lynne wrote:

>Have you tried playing with the statistics gatherer?

Nope.  I will look at the docs some and play around.  This machine is not 
fully production yet. :)

>Also, what is the result of:
>select indexdef from pg_indexes where indexname='t2002_06_station_idx';

snet=# select indexdef from pg_indexes where 
indexname='t2002_06_station_idx';
                              indexdef                               
---------------------------------------------------------------------
 CREATE INDEX t2002_06_station_idx ON t2002_06 USING btree (station)


>It's no trouble.  Cases where the planner fails are essential to improving
>the planner.  Ideally this query should use your index automatically...

Thanks!  I have the ~exact~ same database on another machine with PG 7.1.2 
and it uses the Index Scan without tweaking.  I have never had troubles 
with indexes up until this table/database.

I have got another database on the same 7.2.1 machine.  It has very 
similar data and the same index.  It has no trouble defaulting to use the 
Index.

awos=# explain analyze select * from t1999_06 WHERE station = 'SAMI4';
NOTICE:  QUERY PLAN:

Index Scan using t1999_06_stn_idx on t1999_06  (cost=0.00..25859.88 
rows=36544 width=53) (actual time=152.94..152.94 rows=0 loops=1)
Total runtime: 153.03 msec

EXPLAIN

Augh.  Puzzling.  Thanks everyone for the help!  You all rock!

Daryl



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
message can get through to the mailing list cleanly



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
web.pylons.gene...    hurd.l4/2002-10...    kernel.commits....    user-groups.lin...    yellowdog.gener...    java.drools.use...    security.openva...    package-managem...    linux.debian.us...    qnx.openqnx.dev...    genealogy.gramp...    file-systems.if...    voip.wengophone...    tex.context/200...    ietf.smime/2003...    audio.csound.de...    culture.region....    xfree86.devel/2...    mobile.kannel.u...    distributed.con...    education.engli...    org.user-groups...    bug-tracking.gn...    recreation.bicy...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe