Re: The query plan get all columns but I'm using only one column.

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Moises Lopez <moylop260(at)vauxoo(dot)com>, Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: The query plan get all columns but I'm using only one column.
Date: 2020-04-25 20:40:15
Message-ID: CAHOFxGoem0SAFg54e7njOjfjZWDON03iQcwE6f3Npfmt2HgLqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

The example is nonsensical so I expect it is too contrived to be useful for
analyzing the actual problem.

Additionally, the total query time is under 1ms and most of it is planning
time. Use a prepared statement or do something else to reduce planning time
like reducing statistics target if that actually makes sense for your use
case.

Else, show us something much closer to the real problem.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jean-Christophe Boggio 2020-04-27 17:49:50 Recursive query slow on strange conditions
Previous Message Arcadio Ortega Reinoso 2020-04-25 19:47:52 Re: PostgreSQL does not choose my indexes well