Re: [PERFORM] Hints proposal

От: Jeff Davis
Тема: Re: [PERFORM] Hints proposal
Дата: ,
Msg-id: 1160758829.31966.221.camel@dogma.v10.wvs
(см: обсуждение, исходный текст)
Ответ на: Re: [PERFORM] Hints proposal  (Alvaro Herrera)
Ответы: Re: [PERFORM] Hints proposal  ("Bucky Jordan")
Список: pgsql-hackers

Скрыть дерево обсуждения

Re: [PERFORM] Hints proposal  (Tom Lane, )
 Re: [PERFORM] Hints proposal  ("Merlin Moncure", )
 Re: [PERFORM] Hints proposal  ("Jim C. Nasby", )
  Re: [PERFORM] Hints proposal  (Tom Lane, )
  Re: [PERFORM] Hints proposal  (Josh Berkus, )
   Re: [PERFORM] Hints proposal  ("Jim C. Nasby", )
    Re: [PERFORM] Hints proposal  (Josh Berkus, )
     Re: [PERFORM] Hints proposal  ("Bucky Jordan", )
      Re: [PERFORM] Hints proposal  (Alvaro Herrera, )
       Re: [PERFORM] Hints proposal  (Jeff Davis, )
        Re: [PERFORM] Hints proposal  ("Bucky Jordan", )
         Re: [PERFORM] Hints proposal  (Jeff Davis, )
          Re: [PERFORM] Hints proposal  ("Jim C. Nasby", )
           Re: [PERFORM] Hints proposal  ("Joshua D. Drake", )
            Re: [PERFORM] Hints proposal  (Andrew Dunstan, )
           Re: [PERFORM] Hints proposal  (David Fetter, )
           Re: [PERFORM] Hints proposal  (Jeff Davis, )
           Re: [PERFORM] Hints proposal  (Stefan Kaltenbrunner, )
     Re: [PERFORM] Hints proposal  ("Jim C. Nasby", )
      Re: [PERFORM] Hints proposal  (Tom Lane, )
      Re: [PERFORM] Hints proposal  ("Bucky Jordan", )
      Re: [PERFORM] Hints proposal  (Josh Berkus, )
       Re: [PERFORM] Hints proposal  ("Jim C. Nasby", )
        Re: [PERFORM] Hints proposal  (Alvaro Herrera, )
        Re: [PERFORM] Hints proposal  (Tom Lane, )
     Re: [PERFORM] Hints proposal  (Gregory Stark, )
      Re: [PERFORM] Hints proposal  (Robert Treat, )
   Re: [PERFORM] Hints proposal  ("Zeugswetter Andreas ADI SD", )
    Re: [PERFORM] Hints proposal  (Josh Berkus, )
  Re: [PERFORM] Hints proposal  (Andrew Sullivan, )
   Re: [PERFORM] Hints proposal  ("Merlin Moncure", )
    Re: [PERFORM] Hints proposal  (Andrew Sullivan, )
   Re: [PERFORM] Hints proposal  ("Zeugswetter Andreas ADI SD", )
    Re: [PERFORM] Hints proposal  (Andrew Sullivan, )
     Re: [PERFORM] Hints proposal  (Csaba Nagy, )
      Re: [PERFORM] Hints proposal  (Josh Berkus, )
     Re: [PERFORM] Hints proposal  ("Zeugswetter Andreas ADI SD", )
 Re: [PERFORM] Hints proposal  (Csaba Nagy, )
  Re: [PERFORM] Hints proposal  (Josh Berkus, )
   Re: [PERFORM] Hints proposal  (Csaba Nagy, )
  Re: [PERFORM] Hints proposal  (Tom Lane, )

On Thu, 2006-10-12 at 18:02 -0400, Alvaro Herrera wrote:
> Bucky Jordan wrote:
> 
> > What about using regular expressions, plus, if you have a function
> > (views, or any other statement that is stored), you can assign a rule to
> > that particular function. So you get matching, plus explicit selection.
> > This way it's easy to find all your hints, turn them off, manage them,
> > etc. (Not to mention dynamically generated SQL is ugly enough without
> > having to put hints in there).
> 
> The regular expression idea that's being floated around makes my brain
> feel like somebody is screeching a blackboard nearby.  I don't think
> it's a sane idea.  I think you could achieve something similar by using
> stored plan representations, like we do for rewrite rules.  So you'd
> look for, say, a matching join combination in a catalog, and get a
> selectivity from a function that would get the selectivities of the
> conditions on the base tables.  Or something like that anyway.
> 
> That gets ugly pretty fast when you have to extract selectivities for
> all the possible join paths in any given query.
> 
> But please don't talk about regular expressions.
> 

It sounds horrible to me too, and I'm the one that thought of it (or at
least I'm the one that introduced it to this thread).

However, everything is relative. Since the other idea floating around is
to put the same hinting information into the client queries themselves,
regexes look great by comparison (in my opinion).

Regards,Jeff Davis




В списке pgsql-hackers по дате сообщения:

От: Josh Berkus
Дата:
Сообщение: Re: [PERFORM] Hints proposal
От: Josh Berkus
Дата:
Сообщение: Re: [PERFORM] Hints proposal