Explain plan on a Select query

From: John Scalia <jayknowsunix(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Explain plan on a Select query
Date: 2020-03-16 16:26:04
Message-ID: 83029EBF-241B-499B-881A-9057399DC67B@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I’m a bit confused on an explain plan I just generated for a select statement. The plan’s first line begins with the word “Append” followed by the usual (cost....) data. What in the world is an Append doing here? I’ve recently performed another analyze on the table, btw.

Also, the query does not seem to be using an index, as the explain shows a pair of sequential scans, speaking of which, the second sequential scan shows it’s on a table, called <table>_test. Which is a little strange, considering that does not exist.

The query’s where clause is on a varchar(25) field. And that field has both a btree index and a trigram index on it. I’ve tried using where =, like, and ~ in order to see if I can get it to use an index. All attempts continue to say sequential scan.

Jay
>
Sent from my iPad

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message MichaelDBA 2020-03-16 18:35:18 Re: Explain plan on a Select query
Previous Message Shrikant Bhende 2020-03-16 10:49:29 Re: Exclude all child tables during while taking dump