Thread: One I've never seen before:
ERROR: RestrictionClauseSelectivity: bad value 163645.593750 The query is: SELECT p.first_name, p.last_name, t.title, t.rundate, t.app_version, p.email FROM sw_password p, tools t WHERE p.userid = t.userid AND t.category = 'tools' ORDER by t.title; Something wrong with that taht I'm not seeing? :( Marc G. Fournier Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
quick appendum to my own... the 'category' field was created with an 'alter table' command, if that helps any... even from psql, it comes back: postgresql=> select category from tools where category = 'projects'; ERROR: RestrictionClauseSelectivity: bad value 163645.593750 If I do it without the where clause, or a where cluase on any other field, all appears well, its only teh one I created with 'alter table' that is "screwed"... Neat...if I rename the table to something else, the problem goes away. If I rename it to old_tools, it still exists, but if I rename it to software, the problem disappears...*raised eyebrows* and the table looks like: postgresql=> \d tools Table = tools +----------------------------------+----------------------------------+-------+ | Field | Type | Length| +----------------------------------+----------------------------------+-------+ | userid | text | var | | title | text | var | | url | text | var | | platform | text | var | | app_version | text | var | | pg_version | text | var | | contact_name | text | var | | contact_email | text | var | | institution | text | var | | company_url | text | var | | keywords | text | var | | description | text | var | | rundate | datetime | 8 | | category | text | var | +----------------------------------+----------------------------------+-------+ On Sun, 7 Feb 1999, The Hermit Hacker wrote: > > ERROR: RestrictionClauseSelectivity: bad value 163645.593750 > > The query is: > > SELECT p.first_name, p.last_name, t.title, t.rundate, t.app_version, > p.email > FROM sw_password p, tools t > WHERE p.userid = t.userid > AND t.category = 'tools' > ORDER by t.title; > > Something wrong with that taht I'm not seeing? :( > > Marc G. Fournier > Systems Administrator @ hub.org > primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org > > Marc G. Fournier Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
> > ERROR: RestrictionClauseSelectivity: bad value 163645.593750 > > The query is: > > SELECT p.first_name, p.last_name, t.title, t.rundate, t.app_version, > p.email > FROM sw_password p, tools t > WHERE p.userid = t.userid > AND t.category = 'tools' > ORDER by t.title; > > Something wrong with that taht I'm not seeing? :( Rerun vacuum analyze. Somehow, bad selectivity/disbursion values are getting into the system tables. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
You are correct...that appears to have fixed it. Is this a problem that should be investigated, or not to worry about? On Sun, 7 Feb 1999, Bruce Momjian wrote: > > > > ERROR: RestrictionClauseSelectivity: bad value 163645.593750 > > > > The query is: > > > > SELECT p.first_name, p.last_name, t.title, t.rundate, t.app_version, > > p.email > > FROM sw_password p, tools t > > WHERE p.userid = t.userid > > AND t.category = 'tools' > > ORDER by t.title; > > > > Something wrong with that taht I'm not seeing? :( > > Rerun vacuum analyze. Somehow, bad selectivity/disbursion values are > getting into the system tables. > > -- > Bruce Momjian | http://www.op.net/~candle > maillist@candle.pha.pa.us | (610) 853-3000 > + If your life is a hard drive, | 830 Blythe Avenue > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 > Marc G. Fournier Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
> > You are correct...that appears to have fixed it. Is this a problem that > should be investigated, or not to worry about? > I am worried about it. My guess is that ALTER TABLE is putting random date into the attdisbursion column. I will check on it when I finish with the optimizer. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
> > quick appendum to my own... > > the 'category' field was created with an 'alter table' command, if that > helps any... > > even from psql, it comes back: > > postgresql=> select category from tools where category = 'projects'; > ERROR: RestrictionClauseSelectivity: bad value 163645.593750 > > If I do it without the where clause, or a where cluase on any other field, > all appears well, its only teh one I created with 'alter table' that is > "screwed"... > > Neat...if I rename the table to something else, the problem goes away. If > I rename it to old_tools, it still exists, but if I rename it to software, > the problem disappears...*raised eyebrows* > > and the table looks like: Fixed. Problem was I was not initializing the new column properly. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
Again. Fixed. > > You are correct...that appears to have fixed it. Is this a problem that > should be investigated, or not to worry about? > > On Sun, 7 Feb 1999, Bruce Momjian wrote: > > > > > > > ERROR: RestrictionClauseSelectivity: bad value 163645.593750 > > > > > > The query is: > > > > > > SELECT p.first_name, p.last_name, t.title, t.rundate, t.app_version, > > > p.email > > > FROM sw_password p, tools t > > > WHERE p.userid = t.userid > > > AND t.category = 'tools' > > > ORDER by t.title; > > > > > > Something wrong with that taht I'm not seeing? :( > > > > Rerun vacuum analyze. Somehow, bad selectivity/disbursion values are > > getting into the system tables. > > > > -- > > Bruce Momjian | http://www.op.net/~candle > > maillist@candle.pha.pa.us | (610) 853-3000 > > + If your life is a hard drive, | 830 Blythe Avenue > > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 > > > > Marc G. Fournier > Systems Administrator @ hub.org > primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org > > -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026