Thread

  1. Re: Why isn't PG using an index-only scan?

    Andrei Lepikhov <lepihov@gmail.com> — 2025-09-19T07:50:41Z

    On 19/9/2025 03:05, David Rowley wrote:
    > On Thu, 18 Sept 2025 at 23:55, Andrei Lepikhov <lepihov@gmail.com> wrote:
    >> Perhaps we should start working on introducing this type of callback/ hook?
    > There's certainly places where you could add a hook that would just
    > add an unacceptable overhead that we couldn't stomach. I expect
    > ExecProcNode would be one of those places.
    That seems a bit odd. It is not a significant issue to instruct the 
    compiler to trust the 'else' branch of the "if (PlanState::hook != 
    NULL)" condition and reduce overhead to zero. However, if the hook is 
    set, it indicates that the user (module or extension) genuinely needs it 
    to be called for this specific node.
    > I do agree that trying to come up with something for this is worthy of
    > some time and effort. Helping people with performance issues when they
    > can't even get EXPLAIN ANALYZE to finish is quite tricky.That's all I need; thank you. Starting a PostgreSQL project without 
    positive feedback from a committer usually results in wasted time, 
    unless you are purely conducting research ;).
    
    -- regards, Andrei Lepikhov