pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Joseph Krogh <andreas@visena.com>
To: pgsql-performance@lists.postgresql.org
Subject: Re: TOAST table performance problem
Date: Fri, 7 Feb 2020 14:41:14 +0100 (CET)
Message-ID: <VisenaEmail.24.3227de9e1532616f.1701fe0f525@tc7-visena> (raw)
In-Reply-To: <CADA48rE2DNh__WfU8v=CVL4wNypPXqrm_ikRDZiuahERoDCnbA@mail.gmail.com>


På fredag 07. februar 2020 kl. 14:23:35, skrev Asya Nevra Buyuksoy <
ayisan1096@gmail.com <mailto:ayisan1096@gmail.com>>: 

Sorry for the misunderstanding. 
I have a table like; 
CREATE TABLE zamazin
 (
 paramuser_id text,
 paramperson_id integer,
 paramdata json,
 paramisdeleted boolean,
 paramactiontime timestamp without time zone
 ) 
paramdata row size is 110KB and over. 

When I execute this query like;
select * from zamazin 
it takes 600 seconds. 
But when analyze the query ; 
"Seq Scan on public.zamazin (cost=0.00..21.77 rows=1077 width=49) (actual 
time=0.008..0.151 rows=1077 loops=1)"
 " Output: paramuser_id, paramperson_id, paramdata, paramisdeleted, 
paramactiontime"
 " Buffers: shared hit=11"
 "Planning time: 0.032 ms"
 "Execution time: 0.236 ms" 
 Why the query takes a long time, I do not understand. I assume that this 
relates to the TOAST structure. 

My guess is the time is spent in the client retrieving the data, not in the DB 
itself. Are you on a slow network? 


-- 
Andreas Joseph Krogh 
CTO / Partner - Visena AS 
Mobile: +47 909 56 963 
andreas@visena.com <mailto:andreas@visena.com> 
www.visena.com <https://www.visena.com; 
 <https://www.visena.com; 

view thread (15+ messages)  latest in thread

Message-ID: <VisenaEmail.24.3227de9e1532616f.1701fe0f525@tc7-visena>
Permalink:  ../VisenaEmail.24.3227de9e1532616f.1701fe0f525@tc7-visena/
Also on:    postgresql.org/message-id/VisenaEmail.24.3227de9e1532616f.1701fe0f525@tc7-visena

 · 

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: andreas@visena.com, pgsql-performance@lists.postgresql.org
  Subject: Re: TOAST table performance problem
  In-Reply-To: <VisenaEmail.24.3227de9e1532616f.1701fe0f525@tc7-visena>

* 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