Thread: Re: [GENERAL] ERROR: JoinClauseSelectivity

Re: [GENERAL] ERROR: JoinClauseSelectivity

From
"sheila bel"
Date:
Hi Bruce,

>
>VACUUM ANALYZE the table.
>

I did this and now my query is working. I don't understand
what exactly VACUUM ANALYZE is doing and why I was getting
the error message. Could you please explain.Thanks
-Sheila


> >
> > I'm trying to do a simple join query and I get an error message.
> > My tables are :
> > agency(agencyid serial, agency_name text, address text, ...)
> > groupleader(leaderid serial, agency_name text, phonenum text , ...)
> >
> > The query :
> > SELECT agencyid FROM agency, groupleader WHERE
> >        agency.agency_name=groupleader.agency_name;
> >
> > The error message :
> > ERROR:  JoinClauseSelectivity: bad value 2.450299
> >
> > I tried the query in other forms such as:
> > SELECT * FROM agency, groupleader WHERE
> >         agency.agency_name=groupleader.agency_name;
> > and
> > SELECT * FROM agency WHERE
> >          agency_name=groupleader.agency_name;
> >
> > I get the same error message. What am I doing wrong here ?
> >
> > Thanks for your help,
> > -Sheila
> > ______________________________________________________
> > Get Your Private, Free Email at http://www.hotmail.com
> >
> >
> > ************
> >
> >
>
>
>--
>   Bruce Momjian                        |  http://www.op.net/~candle
>   pgman@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

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


Re: [GENERAL] ERROR: JoinClauseSelectivity

From
Bruce Momjian
Date:
ALTER TABLE ADD COLUMN had a problem where selectivity was set to some
strange number.  This should be fixed in newer releases.


> Hi Bruce,
>
> >
> >VACUUM ANALYZE the table.
> >
>
> I did this and now my query is working. I don't understand
> what exactly VACUUM ANALYZE is doing and why I was getting
> the error message. Could you please explain.Thanks
> -Sheila
>
>
> > >
> > > I'm trying to do a simple join query and I get an error message.
> > > My tables are :
> > > agency(agencyid serial, agency_name text, address text, ...)
> > > groupleader(leaderid serial, agency_name text, phonenum text , ...)
> > >
> > > The query :
> > > SELECT agencyid FROM agency, groupleader WHERE
> > >        agency.agency_name=groupleader.agency_name;
> > >
> > > The error message :
> > > ERROR:  JoinClauseSelectivity: bad value 2.450299
> > >
> > > I tried the query in other forms such as:
> > > SELECT * FROM agency, groupleader WHERE
> > >         agency.agency_name=groupleader.agency_name;
> > > and
> > > SELECT * FROM agency WHERE
> > >          agency_name=groupleader.agency_name;
> > >
> > > I get the same error message. What am I doing wrong here ?
> > >
> > > Thanks for your help,
> > > -Sheila
> > > ______________________________________________________
> > > Get Your Private, Free Email at http://www.hotmail.com
> > >
> > >
> > > ************
> > >
> > >
> >
> >
> >--
> >   Bruce Momjian                        |  http://www.op.net/~candle
> >   pgman@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
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
>


--
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@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