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: Avoiding generating redo logs

Re: Avoiding generating redo logs

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sun, 17 Sep 2006 07:00:12 +0200
Message-ID: <edlpg2loldb21qs39ro694pktc03l81pd0@4ax.com>


On 16 Sep 2006 15:11:41 -0700, "Martin T." <bilbothebagginsbab5_at_freenet.de> wrote:

>DA Morgan wrote:
>> Frank van Bortel wrote:
>> > DA Morgan schreef:
>> >
>> >> My recommendation would be that you use global temporary tables to cache
>> >> the data as in the following:
>> >>
>> >> CREATE GLOBAL TEMPORARY TABLE test (
>> >> zip_code VARCHAR2(5),
>> >> by_user VARCHAR2(30),
>> >> entry_date DATE)
>> >> ON COMMIT PRESERVE ROWS;
>> >
>> > GTT in combination with mod_plsql is not working.
>> > Also see:
>> > http://asktom.oracle.com/pls/ask/f?p=4950:8:18361359189545016282::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:446620083639
>> >
>> > http://vanbortel.blogspot.com/2006/07/authentication-in-modplsql.html
>> >
>> >>
>> >> This is likely the most efficient structure for your purposes.
>> >>
>> >> But I am left wondering why you think it desirable to let an end user
>> >> sort and filter anything. Wouldn't it be far easier to just teach them
>> >> how to use the WHERE and ORDER BY clauses correctly?
>> >
>> > It is not uncommon in a web application to have those nice little
>> > triangles on top of a column, indicating sort order, and the
>> > possibility to change the sort order
>>
>> Didn't see that requirement before.
>>
>> My feeling, as already stated, is that OP is wasting time as filter and
>> sorting should be done by the SELECT statement.
>>
>As far as I interpret it, that's exactly what the OP is trying to to -
>namely sorting a temporary table of some kind because the original
>query takes too long to execute it again just to sort.
>
>cheers,
>Martin

That may be true, but IMO that is not fixing the problem, but fighting symptoms. If people start worrying about redo log there usually is something fundamentally wrong. Usually with their design and with their knowledge of Oracle. Probably the OP is from a sqlserver background, where a temporary table is a panacea for real query writing, and he is introducing all of his bad habits in his Oracle application.

--
Sybrand Bakker, Senior Oracle DBA
Received on Sun Sep 17 2006 - 00:00:12 CDT

Original text of this message

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