How to create a unique temporary table delete automatically after the join?

I have a lot of users simultaneously accessing web applications.
My problem is how to fix the SELECT WHERE IN('..') clause ...

I read a lot of threads with the same option...

(1) open the connection and start transaction
2) create temporary table
(3) Insert (insert batch) data
(4) the main objective. SELECT JOIN or SELECT WHERE IN (SUBQUERY).
(5) end of transaction and close the connection

How can I ensure that the temporary table created was deleting/moving on 5)?

Thank you very much..

You can do this by using global temporary tables. Also data from the temporary table is automatically deleted after that validation but the table will remain.

for example

CREATE TEMPORARY TABLE global today_sales
ON COMMIT DELETE ROWS
AS SELECT * FROM Orders WHERE order_date = SYSDATE;

http://download.Oracle.com/docs/CD/B19306_01/server.102/b14231/tables.htm#i1006400

http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/statements_7002.htm#i2153132

http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/statements_7002.htm#i2153132

Concerning
Rajesh

Published by: Rajesh on June 10, 2010 15:34

Tags: Database

Similar Questions

  • How to create a unique page on one side of the other view?

    I have a document that considers the side-by-side, except the first page.  I would like to see unique page and the ability to print a page by page!

    Any help?

    Thank you

    Blue

    Looks like you don't have a side-by-side, as it is normally referred to in Acrobat, but that the PDF file is actually a set of pages that are 2 pages per sheet. To be able to print a page of the worksheet, use the crop tool to select one side (and the same on all the leaves if you select everything). Then print this set. For other pages, simply move the culture across the sheet and repeat. Looks like it's what you're trying to do. If you want a single PDF file with 1 page per sheet, a crude to do this is to print each cropped to new PDF series. Then merge the two sets of printing and then rearrange the pages.

  • What is the syntax for creating a global temporary table using a select query

    HII
    I create a global temporary table using a select query... How to speak of "on commit preserve rows ' who?


    create a table temporary global t1 select * from trn_ordbase on the lines of commit preserve;

    but this is an invalid syntax, then how to talk on commit preserve rows in this? If I don't mention, by default its recital on the validation of deleted rows.

    Please help me on this problem.
    create global temporary table t1 on commit preserve rows
      2  as select * from dual;
    
    Table created.
    
    TUBBY_TUBBZ?
    
  • How to create a Unique constraint on a column that already has duplicates. Only future duplicates should be avoided

    Hi all

    Can someone let me know how to create a Unique constraint on a column that already has duplicates. Only future duplicates must be avoided.

    Any help will be greatly appreciated.

    Best regards

    gt1942

    ALTER table Add constraint unique (column_name) may be deferred novalidate;

  • create a global temporary table

    Hey there,

    I want to create a global temporary table, recovering data from another table inside a procedure.
    can you please help in this regard?

    Thank you.

    You said:

    1. create the TWG
    2. insert data from hand of TWG
    3 insert data of TWG to some other table_new according to table
    4 remove the main classification data

    Why do you need all TWG?

    Simply insert the data of table to the main table table_new
    delete the same data from the main table.

    Concerning
    Arun

  • How to create a unique fixed break point to allow scrolling effects?

    I am creating a site that has scrolling effects. I somehow just can't understand for the life of me how to create a 'unique fixed breakpoint. I already have a fluid breakpoint, and whenever I try adding one, it does not always activate scrolling effects. I think it's something very obvious, I'm missing - any advice?

    To use the effects of roll, your site must be fixed in width, not fluid. Scroll effects are disabled when you add a second breakpoint.

    David

    Creative muse

  • Why the blocks of temporary tables are placed in the buffer cache?

    I read the following statement, which seems quite plausible to me: "Oracle7.3 and generates from close db file sequential reading of the events when a dedicated server process reads data from temporary segment of the disc." Older versions of Oracle would read temporary segment data in the database buffer cache using db file scattered reads. Releases latest exploit heuristics that data of temporary segment is not likely to be shareable or revisited, then reads it directly to a server process programs global (PGA). »

    To verify this statement (and also for the pleasure of seeing one of these rare close db file sequential read events), I ran a little experiment on my Oracle 10.2 Linux (see below). Not only it seems that different this v above, the blocks of temporary tables are placed in the buffer cache, but also$ BH. OBJD for these blocks does not refer to an object in the database's existing (at least not one that is listed in DBA_OBJECTS). Either incidentally, I traced the session and have not seen any file db close sequential read events.

    So, I have the following questions:
    (1) is my experimental set-up and correct my conclusions (i.e. are blocks of temporary tables really placed in the buffer cache)?
    (2) if so, what is the reason for placing blocks of temporary tables in the buffer cache? As these blocks contain private session data, the blocks in the buffer cache can be reused by another session. So why do all cache buffer management fees to the blocks in the buffer cache (and possibly remove) rather than their caching in a private in-memory session?
    (3) what V$ BH. OBJD consult for blocks belonging to temporary tables?

    Thanks for any help and information
    Kind regards
    Martin

    Experience I ran (on 10.2 /Linux)
    =============================
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Oct 24 22:25:07 2010
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    
    SQL> create global temporary table temp_tab_4 on commit preserve rows as select * from dba_objects;
    
    Table created.
    
    SQL> alter system flush buffer_cache;
    
    System altered.
    
    SQL> select count(*), status from v$bh group by status order by 1 desc;
    
      COUNT(*) STATUS
    ---------- -------
          4208 free
          3 xcur
    
    SQL> select count(*) from temp_tab_4;
    
      COUNT(*)
    ----------
         11417
    
    SQL> -- NOW THE BUFFER CACHE CONTAINS USED BLOCKS, THERE WAS NO OTHER ACTIVITY ON THE DATABASE
    select count(*), status from v$bh group by status order by 1 desc;
    SQL> 
      COUNT(*) STATUS
    ---------- -------
          4060 free
           151 xcur
    
    SQL> -- THE BLOCKS WITH THE "STRANGE" OBJD HAVE BLOCK# THAT CORRESPOND TO THE TEMPORARY SEGMENT DISPLAYED
    -- IN V$TEMPSEG_USAGE
    select count(*), status, objd from v$bh where status != 'free' group by status, objd order by 1 desc;
    SQL> SQL> 
      COUNT(*) STATUS      OBJD
    ---------- ------- ----------
           145 xcur       4220937
          2 xcur        257
          2 xcur        237
          1 xcur        239
          1 xcur    4294967295
    
    SQL> -- THE OBJECT REFERENCED BY THE NEWLY USED BLOCKS IS NOT LISTED IN DBA_OBJECTS
    select * from dba_objects where object_id = 4220937 or data_object_id = 4220937;
    
    SQL> 
    no rows selected
    
    SQL> SQL> -- THE BLOCKS WITH THE "STRANGE" OBJD ARE MARKED AS TEMP IN V$BH
    select distinct temp from v$bh where objd = 4220937;
    SQL> 
    T
    -
    Y
    
    SQL> 
    Edited by: user4530562 the 25.10.2010 01:12

    Edited by: user4530562 the 25.10.2010 04:57

    The reason to put the blocks to the global temporary table in the buffer cache is the same thing why you put ordinary table blocks in the cache buffers-> you want some of them to be in memory.

    If you ask why don't keep us somehow temporary tables in the PGA - well what happens if this temporary table will be 50 GB? 32-bit platforms cannot even handle this and you do not want a process of becoming uncontrollable so great.

    Moreover, TWG will allow you to restore, back to a backup (or savepoint implied when an error occurs during a call DML), and this requires protection by the cancellation. Place lines / revenge in PGA would have complicated the implementation even further... now GTT is almost of the regular tables which just happened to reside in temporary files.

    If you really want to put data in the PGA only, then you can create collections of PL/SQL and even access through the use of SQL (coll CAST AS xyz_type) where xyz_type is a TABLE of an object any.

    --
    Tanel Poder
    New online seminars!
    http://tech.e2sn.com/Oracle-training-seminars

  • On the right of the adressbox, I always have Yahoo then Google, how can I solve that, I already delete Yahoo from the list in the box search, but every time I start firefox Yahoo is back. Thanks Ron Mijtelen ter, Amsterdam.

    Question
    On the right of the adressbox, I always have Yahoo then Google, how can I solve that, I already delete Yahoo from the list in the box search, but every time I start firefox Yahoo is back. Thanks Ron Mijtelen ter, Amsterdam.

    Hi Ron,

    Have you looked at article in the Knowledge Base using the search in Firefox bar? There are lots of good information in there. You happen to have an installed Yahoo! toolbar? You must disable or delete as well if you do. Try to start Firefox in Mode safe mode by holding down the SHIFT key while starting Firefox. If you have any problems using the safe, it's a matter of add-on or extension.

    Hope this helps!

  • How to create a custom control for a button where the look apply to everyone else but not the Boolean text?

    Hi all

    I would like to create a button custom as a master, so that if I change the look of the master all other buttons are changed.

    I did it with a custom control, such as a 'type strict def' otherwise the look will change , BUT if I do this as a strict type def I can't change the Boolean text more which should be different on each button.

    How to create a master control of a button where the look apply to everyone else but not the Boolean text?

    Steve Chandler wrote:

    I don't think that you can do. I just looked and as I suspected the Boolean property text is read only for strict typedefs, you cannot use the nodes property to change the text.

    As a just solution make it a typedef. When you want to change the open look the typedef and strict rendering, make your changes, then make no strict again. You will need to update the text Boolean yet once for all instances. Kind of pain. This is perhaps something for the exchange of ideas.

    Alternatively, remove Boolean text and replace with legend

  • How to identify files that may be deleted without jeprodizing the files needed to run the system?

    How to identify files that may be deleted without jeprodizing the files needed to run the system?

    If you have to ask, the answer is "Don't '.  Uninstall programs that you don't need through programs and features or add/remove programs.  Do not, under any circumstances, remove files unless you are absolutely sure you know what you delete first to 100%.

  • How to create a rule of action to subtract from the Ips event log manager console express?

    How to create a rule of action to subtract from the Ips event log manager express console?, some unknown has a guide?

    Thank you.

    Sent by Cisco Support technique iPad App

    Hello

    http://www.Cisco.com/en/us/products/sw/secursw/ps2113/products_tech_note09186a0080bc7910.shtml

    HTH

    Luis Silva

    "If you need IDP (planning, design, implementation) assistance do not hesitate to contact us.

    http://www.Cisco.com/Web/partners/tools/pdihd.html

  • How to create a new project with other page with the new version of Muse layouts?

    Hello
    If someone would continue to operate as before with the inadmissible Muse version... is - this posible to have both versions installed? or how to create a new project with other page with the new version of Muse layouts?
    Or how to download third party) 3 different configurations (desktop/tablet/mobile) under the same url with a clean result, like up yet with the Muse does not?

    Thanks for any help,

    Patrick

    Use the new version! What you want to achieve, will work! Go to the 'Page' menu and choose 'Add another Layout' and the missed buttons are in plan view.

  • How to create e-commerce site using adobe muse from the beginning to the end, please

    How to create e-commerce site using adobe muse from the beginning to the end, please

    Mylenium, why comment you on the forums of Muse? I've never seen a useful comment on these forums. You seem to just upset against Muse all the time.

    in any case, definitely go with widgets Ecwid and J-26. They are the best.

  • How to create a form of relief with highlight on the edge, in 2015 of the Illustrator

    I work in 2015 of the Illustrator. How to create a shape (3d) raised with highlighted on the edge, like this:

    Coordinate shape.jpg

    It will work as a form, not a button, so there is no need of different States. I looked at a few tutorials to create buttons, and they seemed much more complicated that I think you need to create a form like this.

    -Stuart

    Experience 3D bevel & emboss, front view and Tall-round bevel. Adjust the lighting you want. Then add a light shade.

    Personally I have always found these bevel unsatisfactory effects, but you can produce similar results using carefully controlled mixtures

  • How to create a logical fact table in a layer MDB?

    Hello

    I have 3 Dimension table - 2 are in a schema and the last is another schema. Using this 3 dimension tables, I need to create a logical fact table.
    So, my question is if we can create this table made by joining these 3 dimension table that are 2 different schema s?

    Thank you

    Hi Kuldip,
    Business is never a problem.

    Presentation layer is used to group similar business lines tables.
    It's just for users to understand or requirrment.

    You can use different domain tables to create a report. However the MDB and the physical joins is given in the tables to the RPD. It is compulsory to join tables in MDB layer and the physical layer to be used in the analysis.

    Hope that clarifies.

    A course if you think perticular table is used in the object anaother are, so you must add this table to the domain of the RPD. (Which makes sense)

    Mark if it is correct,

    Bachelot

Maybe you are looking for