Help! Create Table with SDO_RELATE query ignores indexes!

Hi, I have a SQL statement like:
select ...
from a, b where sdo_relate(a.loc,b.loc,'querytype=join mask=anyinteract');
When I run this as is, it runs quickly, <10 seconds, and doing an expalin on it shows it is using the spatial indexes.
However if I try:
create table tabl as <select statement>
or
insert into tab1 <select statement>
then it takes over 30 minutes. Examining the trace file shows:
Rows Execution Plan
0 CREATE TABLE STATEMENT GOAL: CHOOSE
0 LOAD AS SELECT
0 NESTED LOOPS
0 TABLE ACCESS (FULL) OF 'AC1'
0 TABLE ACCESS (FULL) OF 'AC2'
I've tried using querytype=WINDOW, I've tried optimizer_mode=RULE and CHOOSE, but nothing forces these create/insert statements to work effectively!
Is this a bug, a documented limitation or is there something I'm missing?
On Oracle 8.1.7, tried on both Linux and Sun Solaris.
Thanks,
Andrew

Andrew,
This is a bug in the optimizer and extensible
indexing for Oracle 8i.
This is fixed in 9i.
Sorry, I don't have a better answer for
this problem.
null

Similar Messages

  • Help creating tables with multi line cells (variable height cells)

    Hi -
    I am trying to create a table where the row height of various rows might not
    be one unit (i.e. there would be wrap around text) but I DO NOT want every cell
    to be the same height. i.e. I only want rows with wrap around to be taller.
    What I have done already is
    - Create a new text renderer and set it as default table renderer.
    - played around with the table.serRowHeight method.
    what I noticed is this. If i call
    table.setRowHeight (32);
    All the rows will be a height of 32 which is expected.
    However, if I do something like:
    table.setRowHeight (0,16);
    table.setRowHeight (1,32);
    All the rows render as height 16.
    I am trying to do this on the fly so to speak. I am setting the table model
    fully and then listening to the tableModelChanged event and then want to
    adjust the rows accordingly.
    I have below listed the code snippit and what i WANT to do and what only seems
    to work:
    public void tableChanged(TableModelEvent e) {
    int rows = table.getRowCount();
    //// Using the api i would expect this to make each row taller
    for (int i = 0; i < rows; ++i) {
    table.setRowHeight(i,16+16*i);
    //// However this one alone makes then all the same height.
    //// I do not want this but want the snippit of code above to work
    //// if possible
    table.setRowHeight(32);
    Thanks in advance....
    matt

    Hi bbrita
    Sorry for the confusion. But basically yes the code below in my system does NOT
    work. In my model i have
    public class ApplicationTableModel extends AbstractTableModel {
    //// other stuff here
    public void setApplicationData(SimpleApplication[] appData) {
    //// set the new data here
    this.fireTableDataChanged();
    and then it does call :
    tableChanged(TableModelEvent e)
    and in there i DO change the heights of the cells but they still all render the same height.
    The basic code snippits I am useing are:
    //// in my table model
    public class ApplicationTableModel extends AbstractTableModel {
    //// other stuff here
    public void setApplicationData(SimpleApplication[] appData) {
    //// set the new data here
    this.fireTableDataChanged();
    //// in the panel i create the table
    public class ApplicationDataTablePanel extends JPanel
    implements ListSelectionListener, TableModelListener {
    //// other stuff here...
    public ApplicationDataTablePanel() {
    appModel = new ApplicationTableModel();
    table = new JTable(appModel);
    table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    table.getSelectionModel().addListSelectionListener(this);
    table.getModel().addTableModelListener(this);
    // not used at the moment
    // table.setDefaultRenderer(Object.class, new MultiLineCellRenderer());
    this.add(new JScrollPane(table));
    public void tableChanged(TableModelEvent e) {
    System.err.println("GET Row count="+table.getRowCount());
    for (int i=0; i<table.getRowCount(); i++) table.setRowHeight(i,i*3+10);
    /// not used
    // table.invalidate();
    for (int i=0; i<table.getRowCount(); i++)
    System.err.println("HEIGHT="+table.getRowHeight(i));
    This does dump to the screen the following (i have triggered something in the
    system to update the model):
    GET Row count=5
    HEIGHT=10
    HEIGHT=13
    HEIGHT=16
    HEIGHT=19
    HEIGHT=22
    Which is what I expect BUT the cells do not change in height (they are all the
    standard size). This is what is baffling me because it seems to be the thing
    you suggested below but does not work. Which seems like exactly what
    should work.
    I was wondering if there was somewhere else in the event flow that I should be
    making these modifications or if I needed to for force any refresh or anything on
    the graph cells. ???
    Thanks so much for the help and any more you might have.
    matt

  • Create table with constraint and index

    If I create a table with constraint key; after that I create an unique index key, I got an error. Please see below.
    Does it mean when I create a table with constraint the unique index are automatically created and I could not create
    index key as I did as below?
    create table test_const(ename varchar2(50) not null,
    key_num number not null,
    descr varchar2(100),
    constraint constraint_test_const unique (ename, key_num));
    create unique index test_const_idx on test_const
    "ENAME","KEY_NUM"
    tablespace tmp_data;
    Error report:
    SQL Error: ORA-01408: such column list already indexed
    *01408. 00000 - "such column list already indexed"*

    Not too hard to check (the answer is yes by the way).
    ME_XE?create table test_const(ename varchar2(50) not null,
    key_num number not null,
    descr varchar2(100),
    constraint constraint_test_const unique (ename, key_num));
      2    3    4 
    Table created.
    Elapsed: 00:00:00.12
    ME_XE?select index_name, index_type
    from user_indexes where table_name = 'TEST_CONST';
      2 
    INDEX_NAME                     INDEX_TYPE
    CONSTRAINT_TEST_CONST          NORMAL
    1 row selected.
    Elapsed: 00:00:00.14
    ME_XE?

  • Problem CREATE TABLE with PRIMARY KEY Still in Trouble ! Please Help!

    Hi there !
    I use the orcle 8i, and i don't know why i can't create table with any primary key EXample:
    SQL> CREATE TABLE O_caisses
    2 (No_caisse NUMBER(3) constraint caisses_pk PRIMARY KEY,
    3 NB_BILLETS NUMBER(5)
    4 )
    5 /
    CREATE TABLE O_caisses
    ERROR at line 1:
    ORA-18008: cannot find OUTLN schema
    ***********some Debuger show me this way: *********************
    Well there r certain point u got to notice when creating a table with constraints.
    1) U can create table with COLUMN level constraint.
    2) U can create table with TABLE level constraint.
    3) In COLUMN level constraint u can't give a constraint a name
    but only mention the type of constraint.
    4) In TABLE level constraint u can give a name to constraint.
    Following are the examples of both
    --COLUMN LEVEL
    CREATE TABLE O_caisses
    (No_caisse NUMBER(3) PRIMARY KEY,
    NB_BILLETS NUMBER(5));
    --TABLE LEVEL
    CREATE TABLE O_caisses
    (No_caisse NUMBER(3),
    NB_BILLETS NUMBER(5),
    constraint pk_caisse primary key (No_caisse));
    ********************And this is another one:*****************
    SQL>grant create any outline to username;
    BUT the problem is still present, i don't know what to do now !
    Please could some body help me !
    Thanks alot!
    Luong.

    The clue is in the error message: the OUTLN schema is missing.
    This is something Oracle 8i introduced to help manage the CBO (or soemthing equally geeky and internal). For some reason your database no longer has this user. It ought to be created automatically during installation (or upgrade) but catproct may not have completed probably or some over zealous admin type has dropped it.
    Solution is to re-install (or re-upgrade) as you cannot create this user on their own. Alas.
    HTH, APC

  • Unable to create table with column default value with date interval

    Please help to create table with calculated date defaullt value:
    CREATE TABLE emp (
      birth_date  DATE  DEFAULT sysdate + interval '3' day NOT NULL
    or
    CREATE TABLE emp (
      some_date DATE,
      birth_date  DATE  DEFAULT some_date NOT NULL
    or
    CREATE TABLE emp (
      some_date DATE,
      birth_date  DATE  DEFAULT some_date + interval '3' day NOT NULL
    below syntax error:
    TT1001: Syntax error in SQL statement before or at: "+"

    I'm afraid this is not possible; as per the SQL Reference, TimesTen only supports 'constant expressions' for the DEFAULT clause and none of these are constant expressions.
    Chris

  • How to create table with dynamic rows

    Hi Ppl,
    I have an array lets say with length of n. I want to creata table with 2 columns and no of rows = array length.
    lets say array length is 3 ( array[0] = 1, array[1] = 2, array[2] = 3) so the table should have 2 columns and 3 rows.
    After creation of table I want to display each array value in each row.
    Can somebody help me in this asap.
    Thanks \
    Ashish

    Hi, Thanks for reply... actually this is one part of rtf. I have put values from xml to an array and now I want to create a table with no of rows = length of array. so here xml will not be useful. could you pls think of it without xml.
    result is like
    lets says below is the array
    array[0] = a
    array[1] = b
    array[2] = c
    array length = 3
    so there should be a table of 2 coulmns and 3 rows. Second column of first row will show 'a', Second column of second row wil show 'b' and Second column of third row will show 'c'.
    Hope this is useful.
    Thakns
    Ashish

  • How to create table with table description

    Hi,
    I would like create table with table description(like creating package or procedure with comments).
    Is it possible to achieve through oracle, if possible please help me how to achieve this.
    Thanks and regards,
    Ibrahim Sayyed.

    > create table test (col1 number);
    > comment on table test is 'this is a comment';
    > select comments from user_tab_comments where table_name = 'TEST';
    COMMENTS
    this is a comment

  • How to create table with row type in smart forms

    How to create table with row type in smart forms with out line type
    please explain me the procedure

    HI,
    A table type describes the structure and functional attributes of an internal table in ABAP. In ABAP programs you can reference a table type TTYP defined in the ABAP Dictionary with the command DATA <inttab> TYPE TTYP. An internal table <inttab> is created in the program with the attributes defined for TTYP in the ABAP Dictionary.
    A table type is defined by:
    its line type, that defines the structure and data type attributes of a line of the internal table
    the options for managing and accessing the data ( access mode) in the internal table
    the key ( key definition and key category) of the internal table
    The row type is defined by directly entering the data type, length and number of decimal places or by referencing a data element, structured type ( structure, table or view) or other table type. Or the row type can be a reference type.
    <b>for more info :</b> http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm
    Internal table
    Regards
    Sudheer

  • Problem on CREATING TABLES  with PRIMARY KEY

    Hi there !
    I use the orcle 8i, and i don't know why i can't create table with any primary key EXample:
    SQL> CREATE TABLE O_caisses
    2 (No_caisse NUMBER(3) constraint caisses_pk PRIMARY KEY,
    3 NB_BILLETS NUMBER(5)
    4 )
    5 /
    CREATE TABLE O_caisses
    ERROR at line 1:
    ORA-18008: cannot find OUTLN schema
    Please could some body help me !
    Thanks alot!
    Luong.

    Luong,
    Your syntax is fine. It looks like you don't have the correct database privileges to create the table. The error message you're getting suggests that you don't have CREATE ANY OUTLINE privileges. You should log in as a user than can grant these privileges and give yourself the correct privileges. I think the syntax is
    SQL>grant create any outline to username;
    Alison

  • How i can create table with data

    How i can create table with data from dev to production?

    How i can create table with data
    [url=http://en.wikipedia.org/wiki/Black_Beast_of_Aa
    aaarrrrrrggghhh]from dev to production?
    [url=http://img2.travelblog.org/Photos/3800/14977/t
    /64816-Col-Kurtz-0.jpg]The horror, the
    horror.lol, you gonna scare somebody here.
    Are we helping devil?

  • OID users ( EUS) problem with grant create table with admin

    Hi,
    We activated enterprise users in the OID.
    There is a role APP_ADMIN that has the following grants:
    create user
    drop user
    create table with admin option
    this is for an application that creates BI schemas, so it needs to be able to create other users.
    I have granted these to a local role, and the user has access to the local role, thanks to the OID setup.
    The create and drop user work.
    however, the grant create table to another user does not work.
    Is there an issue with 'with admin option' grants in Enterprise user security?
    Regards,
    Peter

    If I grant
    grant create table to test_role with admin option;
    it does not work
    if I grant
    GRANT GRANT ANY PRIVILEGE to test_role WITH ADMIN OPTION;
    it does work.
    The test command as user with test_role is:
    grant create table to test_usr;
    very strange!
    If the user is a standard user and I create role test_role
    and grant create table to test_role with admin option it works.
    but if I convert the user to an EUS user and the same privilege is given to the role ( role is granted to a global role to an enterprise role)
    it doesnt work
    Edited by: Peter on Dec 7, 2012 2:36 PM

  • How to create table with resizable row ?

    how to create table with resizable row ?

    I'd suggest you start here:
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html

  • HT1338 I have a macbook Pro i7 mid november 2010. I am wondering if i can exchange my notebook with the latest one. Can anyone help me out with this query please.

    I have a macbook Pro i7 mid november 2010. I am wondering if i can exchange my notebook with the latest one. Can anyone help me out with this query please.

    You can sell your existing computer using eBay, Craigslist or the venue of your choice. You could then use the proceeds to purchase a new computer.

  • How to create table with 1 row 1MB in size?

    Hello,
    I am doing some R&D and want to create a Table with 1 row, which is 1 MB in size.
    i.e. I want to create a row which is 1 MB in size.
    I am using a 11g DB.
    I do this in SQL*Plus:
    (1.) CREATE TABLE onembrow  (pk NUMBER PRIMARY KEY, onembcolumn CLOB);
    (2.) Since 1MB is 1024*1024 bytes (i.e. 1048576 bytes) and since in English 1 letter = 1 byte, I do this
    SQL> INSERT INTO onembrow VALUES (1, RPAD('A', 1048576, 'B'));
    1 row created.
    (3.) Now, after committing, I do an analyze table.
    SQL> ANALYZE TABLE onembrow COMPUTE STATISTICS;
    Table analyzed.
    (4.) Now, I check the actual size of the table using this query.
    select segment_name,segment_type,bytes/1024/1024 MB
    from user_segments where segment_type='TABLE' and segment_name='ONEMBROW';
    SEGMENT_NAME       
    SEGMENT_TYPE        
    MB
    ONEMBROW           
    TABLE            
    .0625
    Why is the size only .0625 MB, when it should be 1 MB?
    Here is the DB Block related parameters:
    SELECT * FROM v$parameter WHERE upper(name) LIKE '%BLOCK%';
      NUM NAME                                                                                   TYPE VALUE 
      478 db_block_buffers                                                                          3 0     
      482 db_block_checksum                                                                         2 TYPICAL
      484 db_block_size                                                                             3 8192  
      682 db_file_multiblock_read_count                                                             3 128   
      942 db_block_checking                                                                         2 FALSE 
    What am I doing wrong here???

    When testing it is necessary to do something that is a reasonably realistic model of a problem you might anticipate appearing in a production system - a row of 1MB doesn't seem likely to be a useful source of information for "R&D on performance tuning"
    What's wrong with creating millions of rows ?
    Here's a cut and paste from a windows system running 11.2.0.3
    SQL> set timing on
    SQL>
    SQL> drop table t1 purge;
    Table dropped.
    Elapsed: 00:00:00.04
    SQL>
    SQL> create table t1
      2  nologging
      3  as
      4  with generator as (
      5     select
      6             rownum id
      7     from dual
      8     connect by
      9             level <= 50
    10  ),
    11  ao as (
    12     select
    13             *
    14     from
    15             all_objects
    16     where   rownum <= 50000
    17  )
    18  select
    19     rownum          id,
    20     ao.*
    21  from
    22     generator       v1,
    23     ao
    24  ;
    Table created.
    Elapsed: 00:00:07.09
    7 seconds to generate 2.5M rows doesn't seem like a problem.  For a modelling example I have one script that generates 6.5M (carefully engineered) rows, with a couple of indexes and a foreign key or two, then collects stats (no histograms) in 3.5 minutes.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    Now on Twitter: @jloracle

  • 29875; error updating table with geometry but without index

    hi,
    I've a table with next description
    AGGREGATEDUNIT_ID NOT NULL NUMBER(38)
    DATASET_ID NUMBER(38)
    GEOMETRY MDSYS.SDO_GEOMETRY
    REDEFINEDMETADATA SYS.XMLTYPE
    I dont need a spatial index in column GEOMETRY, but when I try an update operation:
    INSERT INTO AGGREGATEDUNIT (AGGREGATEDUNIT_ID, DATASET_ID) VALUES (389, 893)
    I get next error:
    INSERT INTO AGGREGATEDUNIT
    ERROR en lmnea 1:
    ORA-29875: fallo al ejecutar la rutina ODCIINDEXINSERT
    ORA-13203: fallo al leer la tabla USER_SDO_GEOM_METADATA
    ORA-13203: fallo al leer la tabla USER_SDO_GEOM_METADATA
    ORA-06512: en "MDSYS.SDO_INDEX_METHOD_9I", lmnea 183
    ORA-06512: en lmnea 1
    anybody knows?
    thanx

    Hi,
    Whether you need the index or not, someone has created a spatial index on the table.
    You can drop the index, or you can add the metadata for the table into user_sdo_geom_metadata (it was there at the time the index was created).
    Hope this helps,
    Dan

Maybe you are looking for

  • Why are dots missing from PDF output?

    When I use the 'line' tool with dots, (in this case to draw a line-break,) AND export a .pdf, it often leaves out a single dot in the line. There are no objects intersecting the line, or even within a half-inch of its location. The missing dot is con

  • Which file to convert in a video (movie) CD?

    in a movie CD, there are 4 folders 1. EXT - LOT_X.VCD, PSD_X.VCD 2. MPEGAV - AVSEQ01. DAT 3. SEGMENT - ENTRIES.VCD, INFO.VCD, LOT.VCD and PSD.VCD 4. VCD and there is separate 'Auto run'file. I have videora ipod converter. My query is "Which file shou

  • Verification error when run the game after download the jad/jar by OTA on BB 8300

    On BB 8800, the jad/jar can be downloaded to the device, when run the game, there is a error msg "Error starting xxxx Module xxxx has verification error xxxx at offset xxxx", the version is OK on BB 8310, but failed on BB 8800 and 8300. I make the ve

  • Design Forums are all jacked up

    This is the 1st one that is screwed up, look and the Last Post times. Seems to me like this forum also had some posts that were within the last week as well. Also I cannot get the 'mark all as read' to work on this one: 2nd one in the Design Forums,

  • How to drop component on JPanel

    Hi, i want to drop some component on JPanel.I'm talking about drag n drop concept, but how to apply it on JPanel. For eg how to drag n drop an image from your tool bar to a JPanel. Thanks in advance.