plan-reading extensive tutorial?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Klint Gore

    plan-reading extensive tutorial?

    In the docs it says "Plan-reading is an art that deserves an extensive
    tutorial, which this is not". Is there one? I've gone beyond simple
    queries (which are performing well) to the more difficult queries (which
    aren't).

    e.g. 4 generation family tree implemented as a view using 14 left outer
    joins back into the same table. If I select only from it, the optimizer
    uses the primary key (single int4 field) in nested loop left join on all
    14. If I join the view to another table, it wants to do it sequentially
    (the other table is just a single int4 field with 1 row. the field is
    the primary key and also has a foreign key constraint to the main table).

    I dont want exact help on this particular query. Posting every query
    I'm having a problem with to the mailing list is a waste of both my time
    and yours (and not really feasable since it requires all the table
    structures and data). I have tried the obvious with vacuum full
    analyze, and changing the settings (like enable_seqscan,
    join_collapse_l imit, from_collapse_l imit...).

    klint.

    +---------------------------------------+-----------------+
    : Klint Gore : "Non rhyming :
    : EMail : kg@kgb.une.edu. au : slang - the :
    : Snail : A.B.R.I. : possibilities :
    : Mail University of New England : are useless" :
    : Armidale NSW 2351 Australia : L.J.J. :
    : Fax : +61 2 6772 5376 : :
    +---------------------------------------+-----------------+

    ---------------------------(end of broadcast)---------------------------
    TIP 9: the planner will ignore your desire to choose an index scan if your
    joining column's datatypes do not match

  • Chris

    #2
    Re: plan-reading extensive tutorial?

    On Mon, 2004-04-19 at 08:35, Klint Gore wrote:[color=blue]
    > In the docs it says "Plan-reading is an art that deserves an extensive
    > tutorial, which this is not". Is there one? I've gone beyond simple
    > queries (which are performing well) to the more difficult queries (which
    > aren't).[/color]

    Red Hat has a tool called "Visual explain" that shows explain output
    graphically:



    It might help understand what's going on.


    Bye, Chris.



    ---------------------------(end of broadcast)---------------------------
    TIP 6: Have you searched our list archives?



    Comment

    • Shridhar Daithankar

      #3
      Re: plan-reading extensive tutorial?

      Klint Gore wrote:
      [color=blue]
      > In the docs it says "Plan-reading is an art that deserves an extensive
      > tutorial, which this is not". Is there one? I've gone beyond simple
      > queries (which are performing well) to the more difficult queries (which
      > aren't).[/color]

      Try this one..



      Shridhar

      ---------------------------(end of broadcast)---------------------------
      TIP 7: don't forget to increase your free space map settings

      Comment

      • Jeff Boes

        #4
        Re: plan-reading extensive tutorial?

        Chris wrote:[color=blue]
        > Red Hat has a tool called "Visual explain" that shows explain output
        > graphically:
        >
        > http://sources.redhat.com/rhdb/
        >[/color]

        I'm having a devil of a time getting this installed on my system ...
        anybody here willing to give me a walk-through?


        --
        Jeff Boes vox 269.226.9550 ext 24
        Database Engineer fax 269.349.9076
        Nexcerpt, Inc. http://www.nexcerpt.com
        ...Nexcerpt... Extend your Expertise

        Comment

        • Jeff Boes

          #5
          Re: plan-reading extensive tutorial?

          Chris wrote:[color=blue]
          > Red Hat has a tool called "Visual explain" that shows explain output
          > graphically:
          >
          > http://sources.redhat.com/rhdb/
          >[/color]

          I'm having a devil of a time getting this installed on my system ...
          anybody here willing to give me a walk-through?


          --
          Jeff Boes vox 269.226.9550 ext 24
          Database Engineer fax 269.349.9076
          Nexcerpt, Inc. http://www.nexcerpt.com
          ...Nexcerpt... Extend your Expertise

          Comment

          • Andrew Sullivan

            #6
            Re: plan-reading extensive tutorial?

            On Tue, Apr 20, 2004 at 05:44:53PM +0000, Jeff Boes wrote:[color=blue]
            >
            > I'm having a devil of a time getting this installed on my system ...
            > anybody here willing to give me a walk-through?[/color]

            I did it just yesterday, to show it to someone. What's the problem?
            Do you have the proper jdk and ant? Are they first in your $PATH? I
            know that on debian, for instance, when you type 'java' you get
            something that's free but which doesn't always work.

            --
            Andrew Sullivan | ajs@crankycanuc k.ca

            ---------------------------(end of broadcast)---------------------------
            TIP 9: the planner will ignore your desire to choose an index scan if your
            joining column's datatypes do not match

            Comment

            • Andrew Sullivan

              #7
              Re: plan-reading extensive tutorial?

              On Tue, Apr 20, 2004 at 05:44:53PM +0000, Jeff Boes wrote:[color=blue]
              >
              > I'm having a devil of a time getting this installed on my system ...
              > anybody here willing to give me a walk-through?[/color]

              I did it just yesterday, to show it to someone. What's the problem?
              Do you have the proper jdk and ant? Are they first in your $PATH? I
              know that on debian, for instance, when you type 'java' you get
              something that's free but which doesn't always work.

              --
              Andrew Sullivan | ajs@crankycanuc k.ca

              ---------------------------(end of broadcast)---------------------------
              TIP 9: the planner will ignore your desire to choose an index scan if your
              joining column's datatypes do not match

              Comment

              Working...