X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E09B1533CC for ; Mon, 18 Apr 2005 12:30:40 -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 52647-06 for ; Mon, 18 Apr 2005 15:30:39 +0000 (GMT) Received: from terminus.dnttm.ro (terminus.dnttm.ro [193.226.98.11]) by svr1.postgresql.org (Postfix) with ESMTP id 24A52533C3 for ; Mon, 18 Apr 2005 12:30:37 -0300 (ADT) Received: from nutzi (dnt-gw-softnrg.dnttm.ro [193.226.89.168]) by terminus.dnttm.ro (8.13.3/8.12.9) with SMTP id j3IFUZqN025627 for ; Mon, 18 Apr 2005 18:30:35 +0300 Received: by nutzi (VPOP3 - Unregistered) with SMTP; Mon, 18 Apr 2005 18:36:14 +0300 Received: from 127.0.0.1 (AVG SMTP 7.0.308 [266.9.15]); Mon, 18 Apr 2005 18:36:14 +0300 Message-ID: <4263D3EE.5010409@softnrg.dnttm.ro> Date: Mon, 18 Apr 2005 18:36:14 +0300 From: Andrei Gaspar User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en To: pgsql-performance@postgresql.org Subject: Sort and index X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Server: VPOP3 V1.2.0d Evaluation X-Virus-Scanned: ClamAV 0.80/822/Tue Apr 12 07:55:55 2005 clamav-milter version 0.80j on localhost X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200504/402 X-Sequence-Number: 11799 Hi, I thought that an index can be used for sorting. I'm a little confused about the following result: create index OperationsName on Operations(cOperationName); explain SELECT * FROM Operations ORDER BY cOperationName; QUERY PLAN ----------------------------------------------------------------------- Sort (cost=185.37..189.20 rows=1532 width=498) Sort Key: coperationname -> Seq Scan on operations (cost=0.00..104.32 rows=1532 width=498) (3 rows) Is this supposed to be so? Andrei -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.15 - Release Date: 4/16/2005