pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: classical_89 <luongnx512@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Perform scan on Toast table
Date: Wed, 5 Dec 2012 19:08:07 -0800 (PST)
Message-ID: <1354763287777-5735406.post@n5.nabble.com> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

Hi everyone ,I have a question. I have a table with large data (i was used
bytea datatype and insert a binary content to table ) so that Postgres help
me get a TOAST table to storage out-of-line values   .
Assume that my table is " tbl_test " and toast table oid is 16816

When i peform  EXPLAIN ANALYZE select  query on tbl_test ( EXPLAIN ANALYZE
SELECT * FROM tbl_test).It show that  sequential scan was performed on
tbl_test ,but when i check pg_toast table with this query : 


SELECT	
	relid,
	schemaname,
	relname,
	seq_scan,
	seq_tup_read,
	idx_scan,
FROM pg_stat_all_tables 	
WHERE relid IN  ( SELECT oid	
	FROM pg_class
	WHERE relkind = 't' ) AND relid = 16816

I saw that  seq_tup_read = 0 and the seq_scan is always is 1 .idx_scan is
increase arcording to the number of query on tbl_test
 
 I was wordering : Do have a sequential scan perform on tbl_test and other
index scan will be peforming on TOAST after this sequential scan ?
Can you explain this dump question to me ,please ? 
P/S : sorry for my bad English .Thanks  ! :)








--
View this message in context: http://postgresql.1045698.n5.nabble.com/Perform-scan-on-Toast-table-tp5735406.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (2+ messages)  latest in thread

Message-ID: <1354763287777-5735406.post@n5.nabble.com>
Permalink:  ../1354763287777-5735406.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1354763287777-5735406.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: luongnx512@gmail.com
  Subject: Re: Perform scan on Toast table
  In-Reply-To: <1354763287777-5735406.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox