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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Login Trigger

Re: Login Trigger

From: Daniel Fink <Daniel.Fink_at_Sun.COM>
Date: Fri, 12 Mar 2004 09:03:49 -0700
Message-id: <4051DF65.5D9D9E@sun.com>


Maryann,

I think you need to read the manual very closely on triggers. The information you are receiving is not really correct.

A trigger is simply a stored procedure that is executed under certain conditions (row modifications, user login, database startup) and it can be written to perform actions that you would normally find in a pl/sql routine. For example, I use triggers to turn on 10046 tracing, which alters the session information (which would be stored in memory). You could also write a trigger to capture login information or read from a table to set the user's session attributes.

It sounds like you want to prerun the user's query. While this is possible from a technical point of view, it is not a wise idea.

First, the query will have to be performed, most likely reading from disk, at some point, regardless of the timing. Even if you were able to perform the query 5 hours and 59 minutes prior to the user login, where would you store the results? On disk.

Second, the time between the login and the query execution is probably seconds, not hours (unless you have a really, really slow login process).

Daniel

Maryann Atkinson wrote:

> Some coworker told me that login triggers actually
> store things on disk instead, and that every time this
> stored info is needed, a disk access will have to occur instead,
> and that doesnt sound too great of a concept...
>
> Does anyone who used login triggers extensively
> have any knowledge and/or opinion to share?
>
> thanks,
> maa
>
> At 10:22 AM 3/12/2004, you wrote:
> >Maa,
> > It is a great concept,,, store everything in memory and eliminate
> >disks. with enough memory you could store the info each user needed.
> > If the user is going to request the same info each time why not use
> >materialized views to increase the thru put.
> >Ron
> >
> > >>> maryann_30_at_yahoo.com 03/11/2004 1:16:21 PM >>>
> >We have a fairly big query that takes about 6 hours
> >to complete. To speed up things, we thought of the
> >following: Create a logon trigger, which stores in memory
> >each user's info during login time.
> >
> >Then when the user clicks a button that starts this query,
> >to have his/her info already in memory as opposed to
> >getting it from disk somewhere.
> >
> >So basically, I just wanted to verify that a login trigger
> >does indeed store things in memory and keeps it there
> >until logout. Is that correct, or should I expect surprises?
> >
> >thanks,
> >maa
> >
> >----------------------------------------------------------------
> >Please see the official ORACLE-L FAQ: http://www.orafaq.com
> >----------------------------------------------------------------
> >To unsubscribe send email to: oracle-l-request_at_freelists.org
> >put 'unsubscribe' in the subject line.
> >--
> >Archives are at http://www.freelists.org/archives/oracle-l/
> >FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> >-----------------------------------------------------------------
> >----------------------------------------------------------------
> >Please see the official ORACLE-L FAQ: http://www.orafaq.com
> >----------------------------------------------------------------
> >To unsubscribe send email to: oracle-l-request_at_freelists.org
> >put 'unsubscribe' in the subject line.
> >--
> >Archives are at http://www.freelists.org/archives/oracle-l/
> >FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> >-----------------------------------------------------------------
>
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to: oracle-l-request_at_freelists.org
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Fri Mar 12 2004 - 10:01:38 CST

Original text of this message

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