Re: [HACKERS] pg_advisor schema proof of concept

2004-03-29 Thread Fabien COELHO
Hello Andreas, > No problem, as long as referencing data is contained in the advice > tables (i.e. referencing the 'offending' object), not just text so the > advice can be shown as attribute of each object. What do you mean by 'referencing data'? Things like oid attributes referencing pg_class

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-27 Thread Andreas Pflug
Fabien COELHO wrote: Ok. A more precise question is: on the client side, whether PHP or anything else, can you take advantage of the information available and provide some usable somehow "dedicated" interface that would make it easy to access the available informations? What would help for that p

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-26 Thread Fabien COELHO
Hello, > Both phpPgAdmin (me) and the pgAdmin team have added or have thought > about adding some 'schema analysis' features to our products. If > pg_advisor is available, I certainly won't bother and I will just > recommend to people that they install it. Ok. A more precise question is: on th

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-25 Thread Richard Huxton
On Thursday 25 March 2004 21:59, Robert Treat wrote: > On Thu, 2004-03-25 at 11:31, Fabien COELHO wrote: > > Are you planning on making some type of differentiation on advise that > is performance based rather than advise that is theory based? I see > both cases being hinted at and it seems like a

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-25 Thread Fabien COELHO
Dear Josh, > > That's why advices are "graded" from info to error in the current > > preliminary version. > > > Advices that may or may not be good depending on undecidable elements > > have a lower grade. For instance, most attributes should be "NOT NULL" > > from a statistical point of view, bu

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-25 Thread Robert Treat
On Thu, 2004-03-25 at 11:31, Fabien COELHO wrote: > > > > Also, if they have a partial index on the FK, it's not good enough! In > > > CVS, IS NOT NULL partial indexes should be used, but in general all > > > others still won't... > > > > Whoa, there, partner! Keep in mind that there are *often

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-25 Thread Fabien COELHO
> > Also, if they have a partial index on the FK, it's not good enough! In > > CVS, IS NOT NULL partial indexes should be used, but in general all > > others still won't... > > Whoa, there, partner! Keep in mind that there are *often* reasons for using > a partial index on an FK, or even no ind

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-25 Thread Josh Berkus
Fabien, Christopher: It would be nice for pgAdmin & PhpPgAdmin to have GUI interfaces to pg_advisor, though. Also, I would argue for this to be a GBorg/pgFoundry project rather than part of the core. It's the sort of thing that could easily be database-version agnostic, and that SQL jockeys w

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-25 Thread Andreas Pflug
Christopher Kings-Lynne wrote: (6) possible inclusion in postgresql? - among other contributions? what about contrib/advisor? - added to template1 on default installation? maybe not for a first release? or yes? it is easier to communicate about I think we're going to want a gborg project

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-24 Thread Christopher Kings-Lynne
I was thinking along the kind of missing index Tom was arguing about for RI checks, that may be helped if an appropriate index is available. I'm not sure what could be done, even with the query, in the general case. How to guess what index would help make a better plan? It depends on the optimiser

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-24 Thread Christopher Kings-Lynne
(6) possible inclusion in postgresql? - among other contributions? what about contrib/advisor? - added to template1 on default installation? maybe not for a first release? or yes? it is easier to communicate about I think we're going to want a gborg project for developing/coordinating tests

LOOK - KITTENS! (was Re: [HACKERS] pg_advisor schema proof of concept)

2004-03-24 Thread Richard Huxton
On Wednesday 24 March 2004 18:02, Tom Lane wrote: > Richard Huxton <[EMAIL PROTECTED]> writes: > > So Tom, are you suggesting: > > 1. A core in the base distribution (C / SQL) > > 2. command-line tool in the base distro (pg_advisor) > > 3. more open project (gborg?) to let people design/add test

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-24 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > On Wednesday 24 March 2004 15:52, Tom Lane wrote: >> I don't know where you are planning on going with this. If it's only to >> be a contrib tool, it's okay to depend on plpgsql. But we couldn't >> incorporate it into the base system because plpgsql is

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-24 Thread Richard Huxton
On Wednesday 24 March 2004 15:52, Tom Lane wrote: > > >> If plpgsql works OK, I say stick with it. > > > > Hmmm. I'm not very happy with plpgsql, > > I don't know where you are planning on going with this. If it's only to > be a contrib tool, it's okay to depend on plpgsql. But we couldn't > inco

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-24 Thread Fabien COELHO
Dear Tom, > This is necessarily so, as the information_schema by definition covers > only concepts standardized by the SQL spec. Since the SQL spec > considers things like indexes to be implementation details, it is simply > not possible for information_schema to tell you everything you want to

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-24 Thread Tom Lane
Fabien COELHO <[EMAIL PROTECTED]> writes: >>> (1) should it use pg_catalog.* or information_schema.*? >> >> Not sure portability is important, but using information_schema will >> presumably make it less likely that things will change between versions. > Another issue I found is that, although al

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-24 Thread Fabien COELHO
Dear Richard, > > (1) should it use pg_catalog.* or information_schema.*? > > Not sure portability is important, but using information_schema will > presumably make it less likely that things will change between versions. Another issue I found is that, although all the contents of information_sc

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-24 Thread Richard Huxton
On Monday 22 March 2004 09:38, Fabien COELHO wrote: > Hello hackers, > > > please find attached a quick proof of concept for a 'pg_advisor' schema. > > I'm still pushing my agenda, despite lack of reaction on the list;-) > I had time this week-end to improve my current 'pg_advisor' > prototype sche

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-22 Thread Fabien COELHO
Hello hackers, > please find attached a quick proof of concept for a 'pg_advisor' schema. I'm still pushing my agenda, despite lack of reaction on the list;-) I had time this week-end to improve my current 'pg_advisor' prototype schema. This new version is now less a proof of concept and more a

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-19 Thread Fabien COELHO
> please find attached a quick proof of concept for a 'pg_advisor' schema. Here is a "larger" but nevertheless still quick proof of concept, alas with some buggy PL/pgSQL that I wrote with my little finger. It implements some foreign key type checks for which I submitted be patches some time ago

[HACKERS] pg_advisor schema proof of concept

2004-03-19 Thread Fabien COELHO
Dear hackers, please find attached a quick proof of concept for a 'pg_advisor' schema. Well, the name is 'xpg_advisor' at the time, because it is not a system schema hence it cannot starts with 'pg_'. It appears that some support functions would be useful. I've noticed some are available from p