ROWID confusion

According to the docs, ROWID represents the physical address of the row and is unique in the entire database.
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96524/c13datyp.htm#17757
So, select max(rowid) from a table, I think, will display the latest inserted row from the table. The latest row of course, is inserted next in the available memory (data file or block). My question here is, if for eg: a row is inserted in the physical location represented by rowid AAANH1AALAAAAIiAAA, the next inserted row gets inserted at AAANH1AALAAAAIiAAB and so on. If I delete the row with rowid AAANH1AALAAAAIiAAA and assume we run out of blocks or free space for any new row to be inserted. As AAANH1AALAAAAIiAAA physical address got freed because of deletion earlier, is there any possibility that the newly created row goes to the this address representing the rowid AAANH1AALAAAAIiAAA?
I might've confused you guys with the question. Please let me know if you need further clarification. You are welcome even to conclude my question as an utter non-sense. I always thought max(rowid) is another alternative for selecting latest inserted row in the table. If it is not, please let me know why!
To put my question short, is there any possibility that if a row with certain ROWID (AAA) gets deleted, any further new row can have this ROWID AAA as ROWID after all represents the physical location of the row?
Cheers
Sarma.

Sarma,
I think you got your answer for the situation when rowid is reused after being deleted.
I would like to add that even if you never delete rows from the table, the assumption that max(rowid) means latest row is incorrect.
rowid is the physical address of the row.
This physical address consists of
data object id,
relative file number within the tablespace where data object resides,
block id within the datafile,
row number within the block.
If your data object is in a tablespace with multiple data files, then latest row can be inserted into extent in datafile 1, but if there are any (even older) rows in datafile 2, all of their rowids will be greater than those in datafile 1.
In fact, when you create a tablespace with multiple datafiles, then load data into a table in this tablespace, the extents for this table are usually created in round-robin fashion in all the datafiles that have enough free space to allocate next extent.
Moreover, even with single datafile, if you ever free any space at the beginning of the file (drop or truncate a data object), then your table may create a new extent in the newly freed space at the beginning of the file.
Then, some of the new rows may be created in the beginning of the file and their rowid will be less than for older rows at the end of the file.
For partitioned tables there are even more variations because each partition has its own data object id (first four bytes of the rowid).
Kirill

Similar Messages

  • Does the 'default where clause' query select the ROWID by default ?

    Hi ,
    The query in default where property of a data block is as follows:
    global.prim_lang = :global.user_lang
    and upper(group_name) like upper('%' || :B_apply_inclusions.TI_group_desc || '%')
    UNION ALL
    select g.rowid, g.group_no
    from table1 t,
    table 2 g
    where :global.prim_lang != :global.user_lang
    and upper(g.group_name) = t.key(+)
    and :global.user_lang = t.lang(+)
    and upper(nvl(t.translated_value, g.group_name)) like upper('%' || :B_apply_inclusions.TI_group_desc || '%')
    The g.rowid was added in the UNIONALL portion of the query because the first part of the query was bringing rowid as well.
    We are in 10.1.2.3.0 forms version.
    However for a user in forms verion 10.1.2.0.2, the query is giving an error " Unable to perform query " - due to mismatch in the number of columns selected in the query union.
    because for this user, rowid is not selected as part of default where clause query( 1st part of the query before the unionalll).
    If g.rowid is removed from the 2nd part of the query , it errors out in 10.1.2.3.0 forms version.
    Could you kindly clarify when this rowid will also be selected by the default where clause of a block and why this issue is occuring?Is this issue related to forms version or any other property of the block? Is it is version based, is there a patch available to deal with the same?
    Thanks in Advance.

    You normally change the default_where block property just when you want to chnage the filter conditions for what is selected from a given block data source.
    Querries with union or minus will confuse forms as to the rowid and will no longer be albe to perform the default insert/update/delete, not knowing the rowid and the table to perform the dml on.
    A from clause query will be the best way to change dynamically the tables you select from and also the where. But, by using that, if you wish to insert/update/delete, you will have to use on-insert/update/delete triggers where the processing will have to rely on some primary key columns and not on rowid.
    Or, instead of a from-clause, you may use a view, but that will definitely be less flexible than a from clause query.

  • ORA-01445: cannot select ROWID from, or sample, a join view without a key-p

    Hi All,
    I am facing issue with one sql query. It is giving me error:
    ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table
    I am not getting any clue to solve this. On internet, i didn't find proper reason for this error and troubleshooting way and solution for this error. Everywhere i saw one sentence, "Key preserved means the row from the base table will appear AT MOST ONCE in the output view on that table" but it didn't solve my problem.
    I have 1099 columns in one select query. so avoiding the actual column list in select clause. Instead I am trying to select ROWIDs from all tables in join. My understanding is ROWID is a unique identifier in table not in database. But though I remove ROWIDs, I get same error. So please don't bother about these ROWIDs.
    SELECT
    TO_DATE(FACT.BUS_DATE_FKID,'YYYYMMDD')
    ,FACT.ROWID AS ABC1
    ,FACT_ADJ.ROWID AS ABC2
    ,DIM_SEC.ROWID AS ABC3
    ,DIM_SEC_ADJ.ROWID AS ABC4
    ,DIS_CAT.ROWID AS ABC5
    ,CTRY.ROWID AS ABC6
    ,BCP.ROWID AS ABC7
    ,STAGE.ROWID AS ABC8
    FROM FACT_POSITION FACT
    LEFT JOIN FACT_POSITION_ADJ FACT_ADJ ON FACT.POSITION_PKID = FACT_ADJ.POSITION_FKID
    LEFT JOIN DIM_SOURCE_SYSTEM SOURCE ON FACT.SOURCE_SYSTEM_FKID = SOURCE.SOURCE_SYSTEM_PKID
    LEFT JOIN DIM_SECURITY DIM_SEC ON FACT.SUBSYS_SECURITY_FKID = DIM_SEC.SECURITY_PKID
    LEFT JOIN DIM_SECURITY_ADJ DIM_SEC_ADJ ON FACT.SUBSYS_SECURITY_FKID = DIM_SEC_ADJ.SECURITY_PKID
    LEFT JOIN DIM_DISCLOSURE_CATEGORY DIS_CAT ON FACT.DISCLOSURE_CATEGORY_FKID = DIS_CAT.DISCLOSURE_CATEGORY_PKID
    LEFT JOIN COUNTRY_REFERENCE CTRY ON CTRY.DESCRIPTION = DIM_SEC.ISSUER_COUNTRY
    LEFT JOIN BUSINESS_CLOSE_PERIOD BCP
    ON BCP.BUSINESS_CLOSE_DATE = ADD_MONTHS(TRUNC(TO_DATE(FACT.BUS_DATE_FKID,'YYYYMMDD'),'MM'), 1) -1
    AND BCP.IS_LOCKED='Y' AND BCP.IS_ACTIVE='Y'
    LEFT JOIN GUI_STAGING STAGE ON
    FACT.POSITION_PKID=STAGE.POSITION_PKID
    AND STAGE.IS_ACTIVE='Y'
    AND STAGE.STATUS_ID IN(12,8,1,2,3,4,5)
    WHERE FACT.POSITION_PKID=64524374;
    While trying to sort this error, I found interesting things that made me more confused.
    if I remove TO_DATE function from select clause, same join query works.
    If I remove any table from join and keep TO_DATE function in select clause, query works.
    That tells, there is no problem in query.
    Then please anyone help me to sort out the error. FYI. I have googled a lot for this error. but didn't get solution/clue. That is why I am posting this problem to forum.
    Thanks in advance. waiting for reply ASAP.
    Pravin Pujari
    [email protected]

    I think i got the solution. The syntax i was using (ANSI syntax) doesn't work in the oracle database version i am using.
    When i updated my query with older oracle syntax, it worked.
    SELECT
    TO_DATE(FACT.BUS_DATE_FKID,'YYYYMMDD')
    ,FACT.ROWID AS ABC1
    ,FACT_ADJ.ROWID AS ABC2
    ,SOURCE.ROWID AS ABC3
    ,DIM_SEC.ROWID AS ABC4
    ,DIM_SEC_ADJ.ROWID AS ABC5
    ,DIS_CAT.ROWID AS ABC6
    ,CTRY.ROWID AS ABC7
    ,BCP.ROWID AS ABC8
    ,STAGE.ROWID AS ABC8
    FROM [email protected] FACT
    ,[email protected] FACT_ADJ
    ,[email protected] SOURCE
    ,[email protected] DIM_SEC
    , [email protected] DIM_SEC_ADJ
    , [email protected] DIS_CAT
    , GUI.COUNTRY_REFERENCE CTRY
    , GUI.BUSINESS_CLOSE_PERIOD BCP
    , GUI.GUI_STAGING STAGE
    WHERE FACT.POSITION_PKID=64517140
    AND FACT_ADJ.POSITION_FKID(+) = FACT.POSITION_PKID
    AND SOURCE.SOURCE_SYSTEM_PKID=FACT.SOURCE_SYSTEM_FKID
    AND DIM_SEC.SECURITY_PKID=FACT.SUBSYS_SECURITY_FKID
    AND DIM_SEC_ADJ.SECURITY_PKID(+)=DIM_SEC.SECURITY_PKID
    AND FACT.DISCLOSURE_CATEGORY_FKID = DIS_CAT.DISCLOSURE_CATEGORY_PKID
    AND CTRY.DESCRIPTION = DIM_SEC.ISSUER_COUNTRY
    AND BCP.BUSINESS_CLOSE_DATE = ADD_MONTHS(TRUNC(TO_DATE(FACT.BUS_DATE_FKID,'YYYYMMDD'),'MM'), 1) -1
    AND BCP.IS_ACTIVE='Y'
    AND FACT.POSITION_PKID=STAGE.POSITION_PKID
    AND STAGE.IS_ACTIVE='Y'
    AND STAGE.STATUS_ID IN(12,8,1,2,3,4,5);

  • Rowid and urowid datatypes

    I'm writing an exercise to learn more about different datatypes and am confused about the use of and difference between rowid and urowid. As I understand it using rowid should only be done when writing for backwards compatibility, and urowid should be used for new coding. I'm working in 9.2.0.1.0, so I assume I should use urowid.
    The following code returns an error (shown below). Anyone know why this is happenning?
    create or replace function lrnvrbls
    return varchar2
    is
    v_rowid urowid;
    v_data varchar2(100);
    select rowid
    into v_rowid
    from mytable
    where rownum = 10 -- 10 is just a number I chose
    execute immediate
    'select mycolumn ' ||
    'from mytable ' ||
    'where rowid = ' ||
    v_rowid
    into v_data;
    return v_data;
    end;
    SQL>select lrnvrbls from dual;
    select lrnvrbls from dual
    ORA-00904: "AAAHCAAAMAAAADVAAI": invalid identifier
    I've tried using both ROWID and UROWID datatypes with no luck. Also tried CHARTOROWID and ROWIDTOCHAR and failed the same way.
    Anybody understand how to use this?

    A single datatype called the universal rowid, or UROWID, supports both logical
    and physical rowids, as well as rowids of foreign tables such as non-Oracle
    tables accessed through a gateway.
    A column of the UROWID datatype can store all kinds of rowids. The value of the
    COMPATIBLE initialization parameter must be set to 8.1 or higher to use UROWID
    columns.
    DROP TABLE mytable
    CREATE TABLE mytable
    AS SELECT owner mycolumn FROM all_tables
    WHERE rownum < 100
    CREATE OR REPLACE
    FUNCTION lrnvrbls
    RETURN varchar2
    IS
    v_rowid urowid;
    v_data varchar2(100);
    strSQL varchar2(255);
    BEGIN
    select rowid
    into v_rowid
    from mytable
    where rownum = 1;
    strSQL := 'select mycolumn from mytable where rowid = '''||v_rowid ||'''';
    execute immediate strSQL into v_data;
    return v_data;
    END lrnvrbls;
    SELECT lrnvrbls FROM DUAL
    DROP FUNCTION lrnvrbls
    DROP TABLE mytable
    COMMIT
    16:39:37 SQL> DROP TABLE mytable
    16:39:39 2 /
    Table dropped.
    Elapsed: 00:00:00.00
    16:39:39 SQL> --
    16:39:39 SQL> CREATE TABLE mytable
    16:39:39 2 AS SELECT owner mycolumn FROM all_tables
    16:39:39 3 WHERE rownum < 100
    16:39:39 4 /
    Table created.
    Elapsed: 00:00:00.00
    16:39:39 SQL> --
    16:39:39 SQL> CREATE OR REPLACE
    16:39:39 2 FUNCTION lrnvrbls
    16:39:39 3 RETURN varchar2
    16:39:39 4 IS
    16:39:39 5 --
    16:39:39 6 v_rowid urowid;
    16:39:39 7 v_data varchar2(100);
    16:39:39 8 strSQL varchar2(255);
    16:39:39 9 --
    16:39:39 10 BEGIN
    16:39:39 11 --
    16:39:39 12 select rowid
    16:39:39 13 into v_rowid
    16:39:39 14 from mytable
    16:39:39 15 where rownum = 1;
    16:39:39 16 --
    16:39:39 17 strSQL := 'select mycolumn from mytable where rowid = '''||v_rowid ||'''';
    16:39:39 18 --
    16:39:39 19 execute immediate strSQL into v_data;
    16:39:39 20 --
    16:39:39 21 return v_data;
    16:39:39 22 --
    16:39:39 23 END lrnvrbls;
    16:39:39 24 /
    Function created.
    Elapsed: 00:00:00.00
    16:39:39 SQL> --
    16:39:39 SQL> SELECT lrnvrbls FROM DUAL
    16:39:39 2 /
    LRNVRBLS
    SYS
    Elapsed: 00:00:00.00
    16:39:39 SQL> --
    16:39:39 SQL> DROP FUNCTION lrnvrbls
    16:39:39 2 /
    Function dropped.
    Elapsed: 00:00:00.01
    16:39:40 SQL> DROP TABLE mytable
    16:39:40 2 /
    Table dropped.
    Elapsed: 00:00:00.00
    16:39:40 SQL> COMMIT
    16:39:40 2 /
    Commit complete.
    Elapsed: 00:00:00.00
    16:39:40 SQL>
    */

  • Undo confusion

    Hi,
    As part of my understanding of how undo works, could somebody explain to me the following as I'm quite confused on this.
    1. create table a (b number, c varchar2(30));
    2. insert into a values (1,'hallo');
    3. Check how many undo records have been created:
    select used_urec from v$session s, v$transaction t
    where s.audsid=sys_context('userenv', 'sessionid') and
    s.taddr = t.addr;
    This show 1 undo record because insert stores 1 undo record for rowid ?
    5. insert into a values (2,'foo'); this creates 2 undo records (because of accumlation
    from the previous one?)
    4. insert into a select rownum + 50000, object_name from all_objects where rownum <
    51;
    5. This creates 3 undo records even though 50 inserts have occurred. Why only 3?
    Would appreciate any comments on this?
    Note: the above example has been taken from:
    http://www.adp-gmbh.ch/ora/concepts/undo.html

    What's your Oracle version?
    My test on 10gR1 is different than yours. There's a field for used undo blocks in v$transaction,
    USED_UBLK
    TEST@rman>  create table a (b number, c varchar2(30));
    Table created.
    TEST@rman> insert into a values (1,'hallo');
    1 row created.
    SQL>
      1  select used_ublk,used_urec from v$session s, v$transaction t
      2  where s.audsid=sys_context('userenv', 'sessionid') and
      3* s.taddr = t.addr
    TEST@rman> /
    USED_UBLK  USED_UREC
             1          1
    TEST@rman>  insert into a select rownum + 50000, object_name from all_objects where rownum <51
      2  /
    50 rows created.
    TEST@rman>  select used_ublk,used_urec from v$session s, v$transaction t
      2  where s.audsid=sys_context('userenv', 'sessionid') and
      3   s.taddr = t.addr
      4  /
    USED_UBLK  USED_UREC
             2         51==========================
    On the safe side, I inserted another two batches, 50 and 1000, the resule is pretty constant,
    TEST@rman> insert into a select rownum + 50000, object_name from all_objects where rownum <51;
    50 rows created.
    TEST@rman>  select count(*) from a;
      COUNT(*)
           101
    TEST@rman> select used_ublk,used_urec from v$session s, v$transaction t
      2   where s.audsid=sys_context('userenv', 'sessionid') and
      3    s.taddr = t.addr
      4  /
    USED_UBLK  USED_UREC
             2        101
    TEST@rman> insert into a select rownum + 50000, object_name from all_objects where rownum <1001 ;
    1000 rows created.
    TEST@rman>  select count(*) from a;
      COUNT(*)
          1101
    TEST@rman>  select used_ublk,used_urec from v$session s, v$transaction t
      2   where s.audsid=sys_context('userenv', 'sessionid') and
      3    s.taddr = t.addr
      4  /
    USED_UBLK  USED_UREC
            11       1101

  • Bug-fix needs your vote: queries w/ joins against SQLite return incorrect values because Adobe treats PK col as alias for rowid when it should not

    For someone new to Adobe the forums and products can be bewildering. I've been advised to repost something I posted in Flash Data Integration in this forum.
    Here is the link to the post I put there:
    http://forums.adobe.com/message/2363777#2363777
    I have reported this bug: http://bugs.adobe.com/jira/browse/FB-23750
    I gather bugs get fixed if people vote for them to be fixed. Please vote for it to be fixed. It is serious, and you might not even realize you're suffering from it because the incorrect values returned by the query will seem perfectly plausible.
    If the link above doesn't work, here it is again:
    When I execute the following query in Flex and/or Lita:
    select wrdid, uspelling from WRD WHERE uspelling = 'wingeard'
    the results are:
    uspelling...wrdid
    wingeard   3137
    Look at what comes back when I execute this query using .NET provider by  Robert Simpson for SQLite and SQLite Manager by Mrinal Kant:
    SELECT     rowid, wrdid, uspelling
    FROM         WRD
    WHERE     (uspelling = 'wingeard')
    rowid.......wrdid...........uspelling
    3137........3042............wingeard
    No wonder none of my queries with joins is working correctly in Flex.
    wrdid is defined as "int" not INTEGER.
    http://www.sqlite.org/lang_createtable.html (see INTEGER PRIMARY KEY section):
    "The special behavior of INTEGER PRIMARY KEY is only available if the type name is exactly "INTEGER" (in any mixture of upper and lower case.)  Other integer type names like "INT" or "BIGINT" or "SHORT INTEGER" or "UNSIGNED INTEGER" causes the primary key column to behave as an ordinary table column with integer affinity and a unique index, not as an alias for the rowid."  [emphasis added]
    Now, I happen to think the SQLite developers made a mistake here in failing to follow standards, preferring not to break legacy code. They'd rather break current code instead???  I would not characterize this as a "corner case" and the bug-at-hand is de facto evidence of that.

    Did you try running the queries I posted? What were your results with those?
    What I am seeing is that when I use "int PRIMARY KEY" in a CREATE TABLE statement, that column becomes the special "rowid" column. I believe this is also what you are seeing.
    However, what confuses me is how you're getting a table with three columns "rowid", "id", and "name" in the first place. When I run this SQL...
    CREATE TABLE test
    id int PRIMARY KEY,
    name String
    ...I get a table with two columns: a normal column named "name", and a special primary key column named "id", which for this table is identical to the column represented by the rowid identifier.
    However, if I understand correctly, your table has three columns, "id", "name", and the special primary key column (i.e. "rowid"). Is that right? Can you give me the SQL that was used to create the table, or tell me how the table was created (e.g. if you used a tool like Lita) so I can try to re-create your exact situation? That would really be very very helpful -- it was the only detail that was missing in your last post, so I had to guess on that one detail.
    I tried something else to re-create your situation. I ran the following statement:
    CREATE TABLE test
    id int
    name String
    That gave me a table with two real columns plus the rowid column. Then I ran the three insert statements on that table, and when I ran the select statement I got the expected result:
    id     name
    1     one
    2     two
    7     seven
    Again, I'm guessing that your table was created differently than my test table, and that's the explanation for the difference.
    Some other possibilities to consider:
    The screen shot doesn't show a SQLResult object, so it seems that you're using some wrapper library or code to execute the query, or at least that you've copied the SQLResult.data Array to another variable named results. Although it seems less likely to me, it's possible that somewhere in that code something is getting scrambled. (But I'd rather rule out AIR as the underlying cause first before attempting to explore those paths.)
    As a side note, if you really want the database to have three columns (the special rowid column and your two columns id and name), and you don't want id to be the special rowid column, then it sounds to me like you don't actually want to define id as the primary key. If you just want the id column to have a constraint that prevents duplicate values, you can define it as a UNIQUE column:
    CREATE TABLE test
    id int UNIQUE,
    name String
    That gives you the same database-enforced constraint of not allowing duplicate values, but it tells the database explicitly that id isn't the same thing as the rowid primary key. (You can still join another table to the id column even if it's not defined as the primary key.)
    P.S. I'm sure you don't mean it this way, but using gigantic red text comes across like shouting -- it's very "loud". I'm trying my best to understand the issue you're having and help you resolve it, and using multiple colors and font sizes doesn't really make your post any more or less clear. Just because I ask you questions, or say that I'm seeing different results than you, doesn't mean I don't believe that you're seeing the results you're seeing. I've definitely seen strange variations and cases where something happens on my computer but others can't duplicate it on their computers -- so I believe that you are getting the results you're getting. I'm just trying to figure out how to make it so that I can also get those results, so that I can pass that on to the engineers who are in a position to make changes.

  • How improve performance on access path TABLE ACCESS BY INDEX ROWID ?

    I have table MOVEMENT with about 26millions entries,
    select rowid from movement xxx
    where
    xxx.sTransType > 0
    AND xxx.sDevice < 1000
    AND xxx.sDevice >= 0
    AND (bitand(xxx.sSaleFlag,1) = 0 AND bitand(xxx.sSaleFlag,4) = 0)
    AND xxx.sArtClassRef < 100
    and xxx.tActionTime BETWEEN TO_DATE('13-05-2011 08:08:34', 'dd-mm-yyyy hh24:mi:ss') AND to_date('13-05-2011 14:08:34', 'dd-mm-yyyy hh24:mi:ss') ;
    PLAN_TABLE_OUTPUT
    Plan hash value: 679628763
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 34 | 10102 (1)| 00:02:02 |
    |* 1 | TABLE ACCESS BY INDEX ROWID| MOVEMENT | 1 | 34 | 10102 (1)| 00:02:02 |
    |* 2 | INDEX RANGE SCAN | MOVATIME_IX | 18489 | | 51 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - filter("XXX"."SARTCLASSREF"<100 AND BITAND("XXX"."SSALEFLAG",1)=0 AND
    BITAND("XXX"."SSALEFLAG",4)=0 AND "XXX"."STRANSTYPE">0 AND "XXX"."SDEVICE"<1000
    AND "XXX"."SDEVICE">=0)
    2 - access("XXX"."TACTIONTIME">=TO_DATE('2011-05-13 08:08:34', 'yyyy-mm-dd
    hh24:mi:ss') AND "XXX"."TACTIONTIME"<=TO_DATE('2011-05-13 14:08:34', 'yyyy-mm-dd
    hh24:mi:ss'))
    there is index on tActionTime - MOVATIME_IX
    This query returns 12203 rows, so I would anticipate this number in plan table in row with id 1 and column Rows
    Final question if it is possible to optimize this query and what are the next steps to do it?
    Thanks.

    >
    I thought that access path via ROWID's is the fastest way to get row
    >
    It is the fastest way to get the row - FROM THE TABLE.
    But the ROWIDs have to be gotten from the index. That is what the INDEX RANGE SCAN is doing. It is getting the ROWIDs needed and then the TABLE ACCESS BY INDEX ROWID is getting the rows.
    >
    I'am still confused with COST values, TABLE ACCESS BY INDEX ROWID has 200times higher cost than INDEX RANGE SCAN,
    >
    The index entries for a range scan are in order so they are very compact. The actual rows might be all over the place.
    Have you ever you a library? Not the online ones - I mean the old-fashioned kind that actually has books printed on paper?
    If the librarian asks you, her helper, to go get all books whose title begins with the letter 'B' how would you do it?
    You could go back to the stacks and look at every book on every shelf for books with titles' starting with 'B'. That is the same as a FULL TABLE SCAN.
    Or you could go to the card catalog, pull out the drawer (or drawers) that has 'B' on the label and look at the information on the card. Part of that information is the location of the actual book: section, stack; that is similar to the ROWID.
    The card catalog might get you to the right stack of books; then you have to search the stack sequentially to look for the book by name.
    A ROWID will get Oracle to the right block but then it has to find the right row.
    So the cost of getting ROWIDs from an index using a RANGE SCAN (where values are scanned in order) is a lot cheaper than actually getting the rows. The first two index entries needed might be right next to each other in order but the rows themselves might be far apart on the disk.

  • Apple ID appearing on another iPhone device (Sync confusion)

    Issue
    iTunes is sporadically requesting access to my partner's Apple ID account when downloading applications and trying to install the other iTunes account applications also when syncing takes place within iTunes. System software/accounts seems confused.
    How can I ensure that both devices remain separate and do not access each other's iTunes accounts or sync over Mac logins? How can I delete mixed applications from separate Apple ID's ensuring it won't replicate the deletion on the primary Apple ID?
    Background
    1 x Macbook Pro OS 10.8.2
    iTunes 11.0.1
    App Store 1.2.1
    1 x iPhone 4S OS 6.0.1 (Device A)
    1 x iPhone 4 OS 6.0.1 (Device B)
    Separate Apple ID's
    Separate iCloud accounts
    iTunes accounts
    Both people have our own iTunes accounts linked to their own device. All details are currently correct when checking Apple ID profiles.
    MacbookPro
    Both people have separate MacBook Pro logins and software is all up to date.
    History
    In the past, over a year ago, both iPhone devices were sync'd via the same iTunes and Macbook log in. (Not a good start I know) Both iPhones always had their own iTunes account for downloading apps and music etc. When I realised I was syncing application data from one iPhone to the other on my Macbook, I created two Macbook log ins. I deleted all applications on Device B that were transferred from Device A and also deleted the applications in Device B's iTunes account. It seemed that both devices finally had seperated, retained their own Apple ID logins, applications and Macbook user logins.
    Device B recently tried to install an application that Device A also had.
    The application installed onto Device B without an issue and there was no confusion with Device A having the same application. The application can be upgraded to provide additional functionality. When Device B requested this within the application to upgrade, the Apple ID of Device A suddenly appeared.
    I checked that Device B was asked to INSTALL the primary basic version of the application rather than OPEN it, just incase the confusion started at this point. It definitely said INSTALL.
    I thought the divorce was done and dusted in the past.
    Why would Device B suddenly point Device A's Apple ID?
    To troubleshoot, I connected Device B to iTunes on the MacBook with Device B's Macbook log in. When iTunes opened within the Apple ID of Device B ALL DEVICE A applications appeared and started to sync these applications to Device B! I am back to mixed accounts.
    How can ITunes suddenly connect the Apple ID's of both accounts and then tell Device B it needs to install Device A's applications? They are separate Apple ID accounts, separate copyright, separate costs.
    I know with iMatch that you can share the library with another device and when this occurs it locks the Apple ID of the primary iTunes account for 90 days on secondary device. We have never done this.
    I'm 'Syncing' trying to work this one out, please help!

    Steve324 wrote:
    s there a solution to get things
    back the way it was before the install?
    Thank you!
    See my previous suggestions

  • HT1414 i am in the process of getting my iphone4 unlocked from att to use it on straighttalk. why do i need to "back up" the iphone and all of this? i dont have an apple computer sooo, im a little confused on why i need to do this. can someone please help

    Can someone please explain and help me? I am unlocking an iphone4 from at&amp;t to use it on the straight talk network. They've confirmed my request to do this and I am now a little confused as to what to do next. They want me to back up the phone using itunes on either a MAC or PC. I do not have an aplle computer but I do have an acer. Sooo, can I use it to do this? Or do I even have to do this to unlock and switch the iphone4 over to a new network? If I do have to what can I do to do this because like I said I do not have a computer by apple? Can anybody walk me through what I need to do next please? I've been waiting to do this for a very long time and I now have the option to have an iphone and use it. Thanks to my awesome boyfriend who Gave me his old iphone when he swapped back to an android. Hahahaha! Please anybody!? Because I sooo don't know what I'm doing and really do not want to mess the phone Or the process up. Thanks to any and all who read this and help me! It is greatly appreciate it!

    Install iTunes on your Acer and you can back up the iPhone. Or back it up to iCloud. If you do not back it up you can get it unlocked, but you will lose all of your content.
    You can get iTunes from http://www.apple.com/itunes.
    Even after unlocking I'm not sure it will work on Straight Talk, because last time I checked ST used Verizon as its carrier, and an AT&T iPhone 4 is not compatible with Verizon's network. You can probably use it on Net 10 or T-Mobile once it is unlocked.

  • Computers on small office network - names getting confused on iChat

    We are using bonjour and iChat on the computers on a small airport network in our office as an instant messaging solution in our office - however, 2 of the computers (which are named differently) keep getting confused and both being called the same name.
    I have done the fix where you go to System Prefs, Users & Groups and then set the address book card to that particular computer owner, restart the computer and then open iChat (using bonjour) - it saves the name but then my colleague becomes the same name as me on iChat - so we do the same thing to her computer (set address book card etc) and it changes her iChat name, but then also seems to override what I had set for mine previously.
    Help!! What can I do to stop these 2 computers seemingly overriding each other? It doesn't happen with the other 4 computers sharing our network...

    Hi,
    In System Preferences > Sharing is the Name the Computer has.
    This does play a part in any Bonjour Connection.
    It is this name that appears in Shares in the Finders's Side bar.
    Separate for that iChat and Messages that have the Bonjour Account Enabled broadcast the details from the My Card in the Address Book.
    Issues can arise with some Server based Logins that create a Global Address book that changes the My Card.
    You get similar difficulties on some DiskImage roll outs of updates and the like if the details of the Address Book are copied as well.
    I am not sure what you mean by the "fix" in System Preferences > Users and Groups to change the My Card or the Computer's Name.
    Yes you can click the Contact Card for that account and it will show you it in the Address Book and it should be th My Card.
    Changing the My Card then does not alter which Card is associated with the Mac User Account.
    There is no access to the Computer's Name
    7:53 PM      Wednesday; August 1, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Unable to capture video from canon xha1s to final cut pro 6.0. so confused

    hi,
    i purchased a canon xha1s and am simply trying to capture the video onto my macbook pro laptop. i keep getting the error saying my settings are incorrect and am confused as what to put and where. i went to the video/audio settings and put what i believed to be correct (HDV) since my camcorder records in HDV. still that error window pops up when i try to log and capture footage.
    any help would be greatly appreciated!

    Hi .. I had a very similar problem .. if the above fails it may be worth a look at this too..
    http://discussions.apple.com/message.jspa?messageID=10804559#10804559
    Jim

  • TS3276 I cannot connect to my outgoing email server on my macBook pro, yet I can, for the same email account on my iPad. Also I can send emails from the other email account I have on my MacBook...really confused can anyone help?

    I cannot connect to my outgoing email server on my macBook pro, yet I can, for the same email account on my iPad. Also I can send emails from the other email account I have on my MacBook...really confused can anyone help?

    Sometimes deleting the account and then re-creating it can solve this issue
    Write down all the information in accounts before doing this
    Highlight the account on the left and click the minus button
    Then click the plus button to add the new account and follow the prompts

  • Which one faster- With Rowid or PK

    Hi,
    Recently came across the concepts of IOT(Index organised table). It was mentioned that
    You must specify a primary key for an index-organized table, because the primary key uniquely identifies a row. Use the primary key instead of the Rowid for directly
    accessing index-organized rows. "
    This surprised me as till date I was assuming that the fastest way to access the data from a table is by Rowid. Isn't this contadicting then?
    Can the experts clarify more on these conceps related to IOT.
    Rgds,
    Aashish

    what is the diff betn a Normal table with PK on some column and IOT with almost
    the same structure?The difference is whatever is implied by that "almost".
    Look, the purpose of index organized tables is to do away with a nugatory object when a table and and its primary key index - have basically the same structure. The classic example is the code lookup table, where the difference between the table's columns (code, code_descr) and its primary key (code) is a single column (code_descr). Nearly access of that table is going to be an indexed read on code to get the description. That usage makes it a good candidate for being an IOT.
    Mere creation of PK on a column would give the same result.No. An index organized table is similar to creating an index on (code, code_descr) but without the need to maintain two sets of data. Furthermore the IOT allows us to include non-primary key columns without compromising our relational integrity.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • The method add() in java.awt.Container made me in confuse

    Here is my two java code file:
    //MyContainer.java
    package sam.gui;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import javax.swing.JApplet;
    import javax.swing.JFrame;
    public class MyContainer extends JApplet {
         private MyButton[] myButton = new MyButton[2];
         private static int counter = 0;
         public MyContainer() {
              myButton[0] = new MyButton(5, 5, 200, 30);
              myButton[1] = new MyButton(5, 40, 200, 30);
              for (int i = 0; i < myButton.length; i++) {
                   add(myButton);
         public void paint(Graphics g) {
              for (int i = 0; i < myButton.length; i++) {
                   System.out.println("MyButton : " + (i+1));
                   myButton[i].draw(g);
         public static void main(String[] args) {
              MyContainer container = new MyContainer();
              JFrame f = new JFrame();
              f.getContentPane().add(container);
              f.pack();
              f.setSize(new Dimension(300, 200));
              f.show();
    //MyButton.java
    package sam.gui;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    public class MyButton extends Component {
         private Color m_rectColor = new Color(128, 73, 0);
         public MyButton(int x, int y, int width, int height) {
              setBounds(x, y, width, height);     
         public void draw(Graphics g) {
              Graphics2D g2 = (Graphics2D)g;
              g.setColor(m_rectColor);
              g.fillRect(0, 0,
                        getBounds().width, getBounds().height);
              System.out.println("x = " + getBounds().x);
              System.out.println("y = " + getBounds().y);
              System.out.println("width = " + getBounds().width);
              System.out.println("height = " + getBounds().height);          
    I thinked the runned result should be below:
    MyButton : 1
    x = 5
    y = 5
    width = 200
    height = 30
    MyButton : 2
    x = 5
    y = 40
    width = 200
    height = 30But in fact, its result is here:
    MyButton : 1
    x = 5
    y = 5
    width = 200
    height = 30
    MyButton : 2
    x = 0
    y = 0
    width = 292
    height = 173I don't know why the result would like this? I have used add(...) method to add two component MyButton to the container MyContainer, But the bounds of the second component is not I want.
    So this problem made me go into confuse.

    You need to learn how layout managers work. The default layout manager of a JApplet and JFrame is BorderLayout .
    /Kaj

  • Confused about Open Cursors :(

    Hi all,
    i need some clarification on this issue, i've read throught the documentation and i'm a bit confused.
    I'm using 10.1.0.2
    select sum(value)
    from v$statname sn,
    v$sesstat st,
    v$session s
    where sn.statistic# = st.statistic#
    and st.sid = s.sid
    and sn.name = 'session cursor cache count'
    The result of the above query is 4926, meaning i have 4926 CLOSED cursors in the session cursor cache.
    select count(1)
    from v$open_cursor
    The result of the above query is 16968, meaning i have 16968 cached cursors
    So there are two distinct cursor Caches ?
    now lets look at other statistic
    select sum(value)
    from v$statname sn,
    v$sesstat st,
    v$session s
    where sn.statistic# = st.statistic#
    and st.sid = s.sid
    and sn.name = 'opened cursors current'
    this one gives me 12212 , so i have 12212 opened cursors (NOT CACHED , REALLY OPENED CURSORS ...is this correct???)
    I suspect that my applications are not closing resultsets (java build application, deployed in oracle application server, database connections in pooled connection) ... so i'm trying to help my developers to find the potencial bug in application.
    How can i get the SQL from OPEN cursors ???
    V$open_cursor gives me SQL from CLOSED cached cursors ...
    Best Regards
    Rui Madaleno

    Hi,
    >>this one gives me 12212 , so i have 12212 opened cursors (NOT CACHED , REALLY OPENED CURSORS ...is this correct???)
    For your instance, yes because you use the sum(value) aggregate function. But I think that the best is get this value per session.
    select count(1) from v$open_cursor
    v$open_cursor shows cached cursors, not currently open cursors, by session. If you're wondering how many cursors a session has open, don't look in v$open_cursor. It shows the cursors in the session cursor cache for each session, not cursors that are actually open. To monitor open cursors, query v$sesstat where name='opened cursors current'. This will give the number of currently opened cursors, by session:
    select a.value, s.username, s.sid, s.serial#
    from v$sesstat a, v$statname b, v$session s
    where a.statistic# = b.statistic#  and s.sid=a.sid
    and b.name = 'opened cursors current';
    >>I suspect that my applications are not closing resultsets (java build application, deployed in oracle application server, database connections in pooled connection)
    In this case, you need to monitor you application. If want, you can use the OEM Database Console and go to [Top Sessions | Session Details] link, or to use this SQL above.
    By the way, do you are getting ORA-1000 errors ?
    If so, set the OPEN_CURSORS parameter high enough that you never get an ORA-1000 during normal operations.
    Cheers

Maybe you are looking for

  • Photoshop CS2 - Crash Exception:  EXC_BAD_ACCESS (0x0001) Code: KERN_INVAL

    My computer has been crashing over the past two days when I launch Photoshop CS 2. I have tried to resolve the issue by disabling my twain pluggins, I have deleted my CS2 Presets/preferences, and I have uninstalled and reinstalled the program. The sp

  • Think T400 Screen flickers when i plug-in the power card

    Hi, I have recently bought the T400 .I have a strange problem If i boot my laptop without power card and after some time if i plug-in the power card the screen is flickering continuously. if i remove the power card it stops flickering... Any one has

  • Mulitple Slideshows in iDvd

    Hello everyone. I exported two slideshows from iPhoto 09 to iDvd. They are the same slideshow but one is in 4:3 & the other is in 16:9. Is it possible to put both slideshows on the same DVD. I would like the menu to have two different play buttons. I

  • Prints too many pages

    I told the printer to print 10 copies from The Print Shop 23.1 and I removed the paper after printing 30 copies. Deleted the print job. If I copy the document, it prints the correct amount.  Any ideas??

  • CS4 printing does not list tabloid page size

    Mac OS: Snow Leopard Printer: HP Deskjet 9300 Driver: Gutenberg v.5.2.3 I'm attempting to print a picture that is 11 x 17 inches.  When I choose page size, the choices are enormous but oddly enough there is no 11 x 17.  I went ahead and customized th