pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: NSO <nso@fmf.vtu.lt>
To: Sean Davis <sdavis2@mail.nih.gov>
Cc: pgsql-performance@postgresql.org
Subject: Re: Bytea poor performance
Date: Sat, 15 Oct 2005 17:48:54 +0300 (EEST)
Message-ID: <17532.81.7.89.65.1129387734.squirrel@fmf.vtu.lt> (raw)
In-Reply-To: <BF768594.10D2B%sdavis2@mail.nih.gov>
References: <17363.81.7.89.65.1129384809.squirrel@fmf.vtu.lt>
	<BF768594.10D2B%sdavis2@mail.nih.gov>


  Yes, it takes even up to 35 seconds.. I did the same query on the server
(not PC with was connected directly to server with 100mbit net), and /I
got better result it is 3.5 - 4 seconds, but it still not good.. Why it
is slow? and why the difference is so big? I mean from 4 to 35 seconds?

thx

> On 10/15/05 10:00 AM, "NSO" <nso@fmf.vtu.lt> wrote:
>
>> Hello,
>>
>> How about some explain analyze output?
>> Explain analyse select * from files where nr > 1450
>>
>> "Index Scan using pk on files  (cost=0.00..3.67 rows=50 width=36)
>> (actual time=0.000..0.000 rows=50 loops=1)"
>
> I may not be understanding the output, but your actual time reports 0 for
> the query.  And the total runtime is 23 seconds?
>
> Sean
>
>
>>> On 10/15/05 9:20 AM, "NSO" <nso@fmf.vtu.lt> wrote:
>>>
>>>> Hello,
>>>>
>>>> I am trying to select form table with bytea field. And queries runs
>>>> very
>>>> slow.
>>>> My table:
>>>> CREATE TABLE files (file bytea, nr serial NOT NULL) WITH OIDS;
>>>>
>>>> Query:
>>>> select * from files where nr > 1450
>>>>
>>>> (I have total 1500 records in it, every holds picture of 23kB size)
>>>> Query runs very long:
>>>> Total query runtime: 23625 ms.
>>>> Data retrieval runtime: 266 ms.
>>>> 50 rows retrieved.
>>>>
>>>> explain:
>>>> Index Scan using pk on files  (cost=0.00..3.67 rows=50 width=36)
>>>> Index Cond: (nr > 1450)
>>>>
>>>> Is it possible to do something with it? or it is normal? Our server is
>>>> fast, and all other tables work fine..
>>>
>>> How about some explain analyze output?  Have you done a full vacuum
>>> lately?
>>> How about reindexing?
>>>
>>> Sean
>>>
>>>
>>> ---------------------------(end of
>>> broadcast)---------------------------
>>> TIP 6: explain analyze is your friend
>>>
>>> --
>>> This message has been scanned for viruses and
>>> dangerous content, and is believed to be clean.
>>>
>>>
>>
>>
>
>
> --
> This message has been scanned for viruses and
> dangerous content, and is believed to be clean.
>
>



-- 
This message has been scanned for viruses and
dangerous content, and is believed to be clean.




view thread (14+ messages)  latest in thread

Message-ID: <17532.81.7.89.65.1129387734.squirrel@fmf.vtu.lt>
Permalink:  ../17532.81.7.89.65.1129387734.squirrel@fmf.vtu.lt/
Also on:    postgresql.org/message-id/17532.81.7.89.65.1129387734.squirrel@fmf.vtu.lt

 · 

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: nso@fmf.vtu.lt, sdavis2@mail.nih.gov
  Subject: Re: Bytea poor performance
  In-Reply-To: <17532.81.7.89.65.1129387734.squirrel@fmf.vtu.lt>

* 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