X-Original-To: pgsql-sql@postgresql.org Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id 5253C4763A8 for ; Thu, 6 Mar 2003 12:18:00 -0500 (EST) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 2882934; Thu, 06 Mar 2003 09:17:51 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: "Aspire Something" , "pgsql Sql" Subject: Re: Arrays Or Loop Date: Thu, 6 Mar 2003 09:17:05 -0800 User-Agent: KMail/1.4.3 References: <001101c2e3a5$d507c380$c9c832c0@societykotla> In-Reply-To: <001101c2e3a5$d507c380$c9c832c0@societykotla> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200303060917.05298.josh@agliodbs.com> X-Archive-Number: 200303/168 X-Sequence-Number: 12208 Aspire, > 2. Can we use array for the above thing as > a. Make an array of the valid roll_numbers. such as > ('IDX'=>'ROLL_NUMBER'........) > b. Now select the array element by the index which will produce the > roll_number and work on it. > c. Array could be build by for loop > 3. Will the array approch execute code fast. if yes can you please give me > some refrences so that i can actually > build one such function. Unfortunately, the current version of PL/pgSQL have problems with array support. So if you want to test this with arrays, you will have to use another language, such as C or Python. > 4. Lastly if i use views will they help in fas execution No. If you want fast execution, try writing the procedure in C. -- Josh Berkus Aglio Database Solutions San Francisco