Re: Bind message
От | Oliver Jowett |
---|---|
Тема | Re: Bind message |
Дата | |
Msg-id | 45191C65.3080705@opencloud.com обсуждение исходный текст |
Ответ на | Re: Bind message (Markus Schaber <schabi@logix-tt.com>) |
Список | pgsql-jdbc |
Markus Schaber wrote: > Hi, Oliver, > > Oliver Jowett wrote: >>Isn't this just a very roundabout way of overriding the planner? i.e. >>what you are really doing is saying "ignore your statistics, I know more >>about the parameter values I'm going to give you than I'm actually >>telling you".. > > > No, it's telling the planner "You can assume that all those queries for > my statement are similar enough that the same query plan will fit them, > so you can safe the overhead of both parsing and planning". What I mean is, if you are prepared to say that, what you are really wanting is to second-guess the planner and tell the server "use *THIS* plan" explicitly .. In both approaches, you (the app developer) need detailed knowledge about what sort of plans work for the parameters & query you are using (for your particular server version and dataset etc). Doing that at the Parse/Bind level doesn't seem right and in fact seems even more errorprone than explicitly specifying a plan, since you are relying on the planner picking a particular plan for a particular set of parameter values that you happened to use first which may or may not always be true depending on things like the current state of DB statistics.. -O
В списке pgsql-jdbc по дате отправления: