Prevent full access Nested Table

Hello

I have a table that I use as a cache for a collection of type of oracle objects. The query to generate the collection object is intense. If the idea is to build once and then store it in the table for the next time that it is needed.

The challenge is that Oracle wants to complete access table on this table nested each time. Here's my table creation script:
CREATE TABLE key_cache
(
   set_id     NUMBER,
   cached_obj t_key_tbl,
   timestamp  DATE,
   CONSTRAINT key_cache_pk
   PRIMARY KEY(set_id)
)
NESTED TABLE cached_obj STORE AS cached_obj_tbl RETURN AS VALUE
TABLESPACE data_sm;
I will never need to select this table based on any value in the nested table. Is there anyway to prevent full access on the nested table in oracle? I tried to create an index on it, but who did not have Oracle. I hope so, there is another way to avoid this. Thanks for the research!

user516246 wrote:
However, I need to select the obj being cached on in a variable, which causes a full access of the cached_obj, high cost, bytes and the CPU cost table.

Well, it's because you created the nested with STATEMENT OF VALUE AS table. If create you it as INDEX of RETURN WITH:

SQL> CREATE TABLE key_cache
  2  (
  3    set_id     NUMBER,
  4    cached_obj t_key_tbl,
  5     timestamp  DATE,
  6     CONSTRAINT key_cache_pk
  7     PRIMARY KEY(set_id)
  8  )
  9  NESTED TABLE cached_obj STORE AS cached_obj_tbl RETURN AS LOCATOR
 10  /

Table created.

SQL> explain plan for
  2  select * from key_cache where set_id = 1
  3  /

Explained.

SQL> @?\rdbms\admin\utlxpls

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------
Plan hash value: 13847710

--------------------------------------------------------------------------------------------
| Id  | Operation                   | Name         | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT            |              |     1 |    32 |     1   (0)| 00:00:01 |
|   1 |  TABLE ACCESS BY INDEX ROWID| KEY_CACHE    |     1 |    32 |     1   (0)| 00:00:01 |
|*  2 |   INDEX UNIQUE SCAN         | KEY_CACHE_PK |     1 |       |     1   (0)| 00:00:01 |
--------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - access("SET_ID"=1)

14 rows selected.

SQL> 

But if you want to RETURN as VALUE, why don't index you the nested table:

SQL> CREATE TABLE key_cache
  2  (
  3    set_id     NUMBER,
  4    cached_obj t_key_tbl,
  5     timestamp  DATE,
  6     CONSTRAINT key_cache_pk
  7     PRIMARY KEY(set_id)
  8  )
  9  NESTED TABLE cached_obj STORE AS cached_obj_tbl((PRIMARY KEY(NESTED_TABLE_ID)))
 10  RETURN AS VALUE
 11  /

Table created.

SQL> explain plan for
  2  select * from key_cache where set_id = 1
  3  /

Explained.

SQL> @?\rdbms\admin\utlxpls

PLAN_TABLE_OUTPUT
-----------------------------------------------------------------------------------------------------------------------
Plan hash value: 1081321400

----------------------------------------------------------------------------------------------
| Id  | Operation                   | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
----------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT            |                |     1 |    32 |     1   (0)| 00:00:01 |
|   1 |  TABLE ACCESS BY INDEX ROWID| CACHED_OBJ_TBL |     1 |    44 |     1   (0)| 00:00:01 |
|*  2 |   INDEX UNIQUE SCAN         | SYS_C0014447   |     1 |       |     1   (0)| 00:00:01 |
|   3 |  TABLE ACCESS BY INDEX ROWID| KEY_CACHE      |     1 |    32 |     1   (0)| 00:00:01 |
|*  4 |   INDEX UNIQUE SCAN         | KEY_CACHE_PK   |     1 |       |     1   (0)| 00:00:01 |
----------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - access("NESTED_TABLE_ID"=:B1)
   4 - access("SET_ID"=1)

17 rows selected.

SQL> 

SY.

Tags: Database

Similar Questions

  • How to prevent a user not to access a table of perticular? This user has select any table privilege. Please help me solve this problem.

    Hello

    How to prevent a user not to access a table special (xxx)?

    This user has SELECT a TABLE ALL privilege. I need to restrict to only not for access xxx to the table, but this table is not existed in its own schema.

    But there is access able as select * from schema.table;

    How can I revoke this privilege.

    Please help me solve this problem.

    Thank you

    Lacombe

    1623609 wrote:

    How can I select privilege on specific tables at the same time?

    I want to create a new user and grants the right to select for tables, except a table (xxxx).

    It will be possible without the keystone of the database?

    One way, in several sql

    coil doit.sql

    Select ' grant select on ' | owner: '. ' || table_name |' to someuser. »

    from dba_tables

    where

    spool off

    Then sanity check "doit.sql" and execute it.

  • How to grant full access to a schema to a user in Oracle

    For example, in MySql, I connect using my account 'Andy' to create a database ('create database BookShopping') with tables/views/functions created.

    Then I have just run for example ' create user Steve (Mike, Lisa, etc.) blah - blah. " "Give all the right on Steve's BookShopping (Mike, Lisa, etc.) blah - blah" to allow all developers on my team to work on this project. Any changes made by a developer is shared by the entire team. (There are a few other non-developers such as Rick QA, he is not allowed to modify the database, so I just do "grant select on BookShopping to Rick")

    How in Oracle? If I use my account ("Andy") to create tables/views/functions, these objects will be under my scheme, that is, with a prefix "Andy." My understanding is correct here?

    So, I have to create another user, called "BookShopping". After logining as 'BookShopping', how to grant full access for this scheme for all developers Steve, Mike, etc., which I am part 'Andy' so that everyone can add to new tables/procedures/triggers etc.?

    There is no subsidy, which gives all object privileges to someone else in a schema. What gives a grant is an important work, it must be done under control. Initially, it must give al grants one by one, but after that (for objects that will be created later), look at this topic:

    Re: Trigger after create schema - grants - SYS_JOURNAL

  • Nested table creates a third table.  Why?

    I create an array of arrays of two points.  However, it seems to me back three nested tables as the code below is what is needed to get the table.  I can't understand why the intermediate table exists.

    Create dashboards with:

    public void getBases(n:uint,_p:uint):Array {}
    p = Math.max (p, 1); / / p is at least two places
    Table-list var = new Array;
    for (var i: uint = 2; i < = 10; i ++) {}
    for (var j: uint = 0; j < n; j ++) {}
    var bignum:int = Math.pow (i, p);
    for (var k: uint = 0; k < p; k ++) {}
    bigNum += Math.floor (Math.random () * i) * Math.pow (i, k);
    }
    bigNum += Math.floor (Math.random () *(i-1)) * Math.pow (i, p);
    var doublet: Array = [i, bignum];
    List.push (doublet);
    }
    }
    var randomlist:Array = new Array;
    While (list.length > 0) {}
    randomlist.push (List.splice (Math.Random () * List.Length, 1));
    }
    Return randomlist;
    }

    Break down the tables with:

    If (answerArray.length > 0) {}
    var doublet2:Array = answerArray.pop ();
    var doublet: Array = doublet2.pop ();          < < < < <-WHY do I NEED THIS, AND I NEED THE CODE TO WORK.
    NUM = doublet [1];
    Base = doublet [0];
    MODEL: Amount (num:Number, newBase:Number, standardization: Number = 1, scale: Number = 1, Sun: String = "null")
    number = new quantity (num, base, standardization, 1, "null", NOW);

    I think that the two uses of splice which are on this post are the same.  To access the items is different and that's what intrigues me.  I literally copied the code segment and I replaced the numbers with an element of array elements, but he could not recover the array without an additional pop element.  I just thought it was weird.  Thanks for the comments.  I was wondering if someone else could duplicate the results and be mystified as me.  Laughing out loud.

  • Oracle 9 error: insert into temp-table collection (nested table)

    Hello everyone

    I have an urgent problem. I have a package which has been developed against 10g but must now be deployed on 9i as well. I don't use 10 g - features and packages compile well on 9.

    Somehow, I get the following runtime error: failed execution: ORA-22905: cannot access the rows of a no nested table item.

    The Code I use to the particular line is

    insert into tmp_report_calculation (select from table (calculations)); *

    tmp_report_calculation is a temporary table and calculations holds a collection type that is a nested table. I do not understand why the error is complaining about "No nested table. Less than 10g everything run took place.

    Can someone help me out here? Furthermore, it is important that I put the results in this temp-table (since I can't use the multiset on Oracle 9)

    concerning
    -Marc

    Try

    insert into tmp_report_calculation (select * from table(cast(calculations as your_collection_type)));
    

    replace"your_collection_type" with your name in the actual collection of course...

  • messages when I go to add bitmogji get please enable full access on the key bitmoji Board is on full access, it's after I've downloaded is10

    When I go to add Bitmoji to iMessage I get please allow full access on the keyboard,

    It is configured to access complete this problem is after I download is 10

    This is a known problem, Bitmoji is working on a fix https://twitter.com/Bitmoji/status/775860193360044032

  • problem with the yellow triangle without preventing Internet access

    problem with the yellow triangle without preventing Internet access.in across the network!
    all PC go to the internet through TMG and some computers work very well and most of the computers triangle shows yellow and always go online, but the connection it needs to slow down, I do everything from restarting all switches and install new TMG and always exist and place on another line to outside the firewall problem disappear?
    What can I do :(

    Hello
    I advise you to follow the link below for Tech Net where your social networking question will be answered by IT pros.
    You can post/search here
    hope this helps,
    B Eddie

  • How to give full access to the port to laptop

    Hello! I need help.
    I get data using xbee connected to the port of the laptop. The problem is with the increase of baud rate, time of receipt does not increase as it is.
    My instructor told me that your com port does not provide complete space to your software (LabVIEW). My question is how to give full access to the com port to LabVIEW? Kindly help...

    Here's my vi... I put the 115200.But baud rate in labview so I get the data and it intrigues, it traces precisely after 8 seconds. But I put the shipment time less than 8 seconds, it does not trace accurately.

  • prevent direct access via webmail

    I want to prevent direct access to common accounts through webmail. for the user X interpreter should be able to display "itsupport" via webmail only after have connected you to its indivisual ID and then open new window https://webmail.domain.ae/Exchange/itsupport and prevent it directly access itsupport via webmail as user X has the permission to access the itsupport

    Thank you

    Hi nouraAJ,

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please ask your question in the Forums of Exchange Server.

    http://social.technet.Microsoft.com/forums/en-us/exchangesvrgeneral/threads

  • Full access DHCP setting

    Hi, this is my first post here, please excuse if this is posted in the wrong forum, but how do I put my router (Cisco M10 V2) in full access DHCP. It is just go on the Basic Menu and Type of Internet connection and configuration in DHCP Auto - Configuration?
    If there is any more please tell me because I'm going to set up my internet to use internet phone service (VoIP I think) using an adapter phone called LINKSYS SPA2102-R and that what he says about how to implement in the DSL Internet user manual.

    BigMann Hi there!

    You can try this procedure.

    Setting up a Linksys router for DSL Internet connection

    After you set up your router, you can use in your LINKSYS SPA2102-R with the wireless business forum to

    Cisco Small Business support community

    It is for devices of small business which is not discussed here. Good luck with that!

  • How to have full access to Windows

    How to have all access to this window?
    When I bought it with the money, then it must be mine property, so! Why don't I have full access to all his files and all services?
    If this is possible (maybe I don't know on this subject) please please send me details if I change in the local policy or any other MSC...!

    Hi rahuldhiman, I have shared your question in a new conversation because she was not related to the previous topic.

    Already, you have full access to your computer, if you have configured your administrator account.  This means that you can access all files on the computer, even the files that belong to other users.  You can also change the passwords of other users and other administrative powers.  It's like 'root' on a unix system.

    Please note, however, that even administrators could occasionally see "access denied" messages. There are legitimate reasons for it. For example:

    1. Junction Points
      they look like folders, smells like records and even could be files in previous versions, but they are not really files.  For example, there is no folder named "Documents and Settings" on Windows 7.  The "Users" folder takes the place of it.  But for compatibility, a junction was created with the name "Documents and Settings".  So if you have enabled the display of hidden and protected from the operating system files, you may see this fake file. If you try to access it, you will get "access denied".  Not because you are limited, but because no folder actually exists.
    2. Safety and least privilege user / User Account Control
      It is dangerous to always have administrator privileges, because any virus or malicious software which can run (or you cheat in the race), would immediately have total control over your computer. Instant infection.  Which is not good, so your ability to modify the system files (such as C:\Windows\System32) is automatically reduced.  Yes, you can still "own" and "change security" so that you can edit these files (because you are the administrator, you can do anything), just because you CAN does not mean you LIKE it.  If you do so, your data and computer security would be at risk.
  • How to prevent/allow access admin of some ip addresses.

    Hello

    try to set up the following scenario:

    a user BOB have created in Cisco ACS 4.2

    have several network with the IP addresses of management devices added all different in Cisco ACS 4.2

    in order to allow BOB to access network devices only if the request for access of BOB comes from a single IP 1.1.1.1

    If BOB tries to access the network of all the other IPS devices, the application should be dismissed regardless because BOB has full access to all network devices.

    Is there a way to do this using Cisco ACS 4.2

    Appreciate your comments.

    Kind regards

    I don't know how or if you can do it by using ACS. You MAY be able to use the network access Restriction function, although I've never tried. Reference.

    It would be easy to simply put a list of access on devices vty lines while limiting access to 1.1.1.1. (although it would affect all users).

  • How can I prevent the access denied message when you use the shutdown command?

    I use shutdown /m \\computername/s

    I have "Access denied (5)" as an answer.
    I am admin on all my computers. Same username and password on each of them.
    How can I get this shutdown command to work remotely, so I can't access every computer command prompt via Remote Desktop?
    How can I prevent the access denied message when you use the shutdown command?

    Hello

    I suggest you to report this issue in TechNet Forums for Windows 7 networks: http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/threads

    Thank you.

  • How can I give a specific computer FULL access to a Windows 7 computer?

    Can someone tell me how to give a specific computer in our full access to 100% of the network of small size for my Windows 7 computer?  We have a windows NT based CNC machine (I'll call that the CNC) which is having a moment difficult to communicate with my Windows 7 computer (I'll call the PC).  When I had windows XP I easily found a place to enter the IP address of the CNC and that seemed to do the trick but, in windows 7 there is about 8 zillion different options and I don't know where to get what I want to achieve.  The folder that needs to see, on the PC, CNC is already shared.  The CNC can access the shared folder, but he forgets that it is available whenever it is stopped.  The NT machine sees it essentially as a mapped drive.  Every morning I have to tell it where is the drive.

    Hello

    I would recommend posting your query in the TechNet Forums. The community of IT professionals in the following TechNet forum will be able to help you the best.

    http://social.technet.Microsoft.com/forums/en/category/w7itpro

    Hope the information is useful.

  • How to configure windows 7 pc to allow full access to the xp pc.

    original title: how to configure windows 7 pc to allow full access to the xp pc. Both PCs have been configured for full sharing

    How to configure windows 7 pc to allow full access to the xp pc. Both PCs have been configured for full sharing. Windows 7 pc has full access to the xp pc. However, on xp pc, all readers of windows FP7 can be seen, but access not authorized expect public folders.

    Any suggestions welcome

    Search in the sharing folder entries in a procedure step by step for the creation of a network of Ethernet cable of two computers between Windows 7 and Windows XP with ICS

    You will be able to share files in C:\Users but Windows 7 has special protection on the folder root the C:\ drive and others.

Maybe you are looking for

  • Hi - I use a homepage iGoogle with Firefox. I can't find a way to copy and paste with it.

    I use a home page iGoogle with the latest version of Firefox. I can't locate an icon or a method to copy and paste to the addresses or the contents of an email. Thanks for any help.

  • Cannot change system settings in Vista

    My Vista machine is in a strange state where I can't seem to change all the settings. For example: Opening Control Panel and clicking on "Classic view;" changes the display but the next time I open the Panel it's return to the standard modeOpening of

  • EOSUPNPSV.exe kiils all WiFi connections

    Hello Just know, after 2 days of investigation, that the EOS utility 2.14 the process named EOSUPNPSV.exe is killing all my wifi on my router Linksys E3200 connections. It is also causing computers connected through wire to surf the internet very slo

  • Cannot install the ATI graphics driver

    Hello! I'm getting pretty sick of this problem. But in any case, I hope you can help me! I just formatted my PC and want to install my GFX driver. My computer: HP Pavilion dv7-6055eo Entertainment Notebook PC Data sheet:

  • Where can I upgrade to Windows Vista?

    original title: can someone help me where can I download vista