Re: Another seq scan instead of index question - Mailing list pgsql-general

From Nicholas Piper
Subject Re: Another seq scan instead of index question
Date
Msg-id 20010807172055.L7365@piamox7.haus
Whole thread Raw
In response to Re: Another seq scan instead of index question  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Another seq scan instead of index question  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Another seq scan instead of index question  (Nicholas Piper <nick@nickpiper.co.uk>)
List pgsql-general
On Tue, 07 Aug 2001, Tom Lane wrote:

> Your real problem is the bogus selectivity estimate.  What version
> are you running?  If 7.0, see contrib/likeplanning/.  If 7.1, I'd
> be interested to see what you get from

I'm on 7.1
(PostgreSQL 7.1.2 on i686-pc-linux-gnu, compiled by GCC 2.95.4)

> select attname,attdispersion,s.*
> from pg_statistic s, pg_attribute a, pg_class c
> where starelid = c.oid and attrelid = c.oid and staattnum = attnum
> and relname = 'cdsongs';

That doesn't look good to me as it contains dodgy bytes...

 attname | attdispersion | starelid | staattnum | staop | stanullfrac | stacommonfrac | stacommonval  | staloval |
                    stahival 

---------+---------------+----------+-----------+-------+-------------+---------------+---------------+----------+--------------------------------------------------------------
 songid  |            -1 | 61094022 |         1 |    97 |           0 |    2.3748e-07 | 1             | 1        |
4210874
 cdid    |   4.65505e-06 | 61094022 |         2 |    97 |           0 |   2.32731e-05 | 677           | 1        |
364477
 track   |     0.0231229 | 61094022 |         3 |    97 |           0 |      0.086018 | 0             | 0        | 97
 song    |   0.000647958 | 61094022 |         4 |  1066 |           0 |    0.00319886 |               |          |
þöföramca 
 extt    |      0.890813 | 61094022 |         5 |   664 |    0.937611 |    2.9685e-05 | The Residents |          | ýòî
ïðîéäåò- ëåòè íà âîñõîä, 
À ÿ, òàê è áûòü, íà çàêàò.

The data came from freedb, translated to postgresql by a small C
program which I didn't write.

Nick

--
Part 3 MEng Cybernetics; Reading, UK       http://www.nickpiper.co.uk/
Change PGP actions of mailer or fetch key see website   1024D/3ED8B27F
Choose life. Be Vegan :-) Please reduce needless cruelty + suffering !

pgsql-general by date:

Previous
From: "Sue Lane"
Date:
Subject: Re: Database handle destroyed without explicit disconnect
Next
From: "Joe Conway"
Date:
Subject: Re: Still wondering about random numbers...