Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: LONG in table ?

Re: LONG in table ?

From: keith boulton <boulke_at_globalnet.co.uk>
Date: Sat, 27 Mar 1999 15:36:23 GMT
Message-ID: <36fcf3a1.18589550@195.147.246.90>


On Fri, 26 Mar 1999 15:25:37 +0100, "Jarek Palka" <triss_at_zeus.polsl.gliwice.pl> wrote:

>I've a table FRM with column LOGO of type LONG which contains bitmap images.
>Table FRM has structure like this :
>ID NUMBER
>NAME VARCHAR2
>CITY VARCHAR2
>...
>LOGO LONG
>
>When I issue SELECT statement after creating table and without any images in
>column LOGO, I get result very quickly. I've inserted a bitmap image into
>table (about 1 MB).
>Now SELECT name FROM FRM takes about 1 second. I changed image in LOGO
>column to smaller one (30 KB) but SELECT statement is still slow ! Even when
>I insert NULL into LOGO column it doesn't metter. Truncating table
>(TRUNCATE) doesn't help. I have to recreate table to speed up response.
>May be there is another way to do it ?
>

For this reason, longs are normally placed in their own table. If the select has no where clause, a full table scan will be performed. Data blocks will be scanned up to the highest point where data was ever written, so updating to a smaller logo will make no difference. I would have expected truncate to reset the high water mark, but it may be that it only resets it if more than one extent was allocated to the table. Received on Sat Mar 27 1999 - 09:36:23 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US