X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 46E21DA240 for ; Sat, 15 Oct 2005 11:08:23 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 51564-04 for ; Sat, 15 Oct 2005 14:08:15 +0000 (GMT) Received: from wimpy.net.nih.gov (mailfwd.nih.gov [128.231.88.106]) by svr1.postgresql.org (Postfix) with ESMTP id 9F42EDA096 for ; Sat, 15 Oct 2005 11:08:17 -0300 (ADT) Received: from wimpy.net.nih.gov (localhost [127.0.0.1]) by wimpy.net.nih.gov (8.12.11/8.11.7) with ESMTP id j9FE8LKM001426 for ; Sat, 15 Oct 2005 10:08:21 -0400 (EDT) Received: from [128.231.145.14] (holmes.nhgri.nih.gov [128.231.145.14]) by wimpy.net.nih.gov (8.12.11/8.11.7) with ESMTP id j9FE8Kdq001423; Sat, 15 Oct 2005 10:08:20 -0400 (EDT) User-Agent: Microsoft-Entourage/10.1.4.030702.0 Date: Sat, 15 Oct 2005 10:08:20 -0400 Subject: Re: Bytea poor performance From: Sean Davis To: NSO Cc: Message-ID: In-Reply-To: <17363.81.7.89.65.1129384809.squirrel@fmf.vtu.lt> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.013 required=5 tests=[AWL=0.013] X-Spam-Level: X-Archive-Number: 200510/241 X-Sequence-Number: 15009 On 10/15/05 10:00 AM, "NSO" 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" 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. >> >> > >