SDO_RDF_MATCH() query pattern size

Hi,
I found that 'SDO_RDF_MATCH()' procedure is using a VARCHAR for 'query-pattern' parameter, which is limiting the size of SPARQL query-pattern to just 4000 bytes in 10gR2 database.
Is there any way that I can send query-patterns, with much bigger size?
Thanks,
Bhaskar.

Please see my comments in the following post.
Failing to execute large queries --> 11.1.0.7.0
Cheers,
Zhe Wu

Similar Messages

  • SDO_RDF_MATCH() Query Performace on 10g - ontology model size-5000 triples

    Hi,
    We are observing severe degradation in the performance of the queries as their size increases? In this context, I want to know if the performance of the query is dependent on the query pattern size? For example, a query with 25 triples in the query pattern is taking nearly 10 secs, to retrieve results from a ontology of size 5000 triples. (no rule bases attached, no inferencing).
    Does using query API in Jena Adapter (instead of using sdo_rdf_match() directly) help improve the performance? Also, can u suggest any tuning on the ontology model for speeding up the query execution?
    Thanks,
    Rajesh.
    Edited by: rajesh narni on Oct 8, 2009 4:29 AM

    Please see my comments in the following post.
    Failing to execute large queries --> 11.1.0.7.0
    Cheers,
    Zhe Wu

  • Query pattern for SDO_RDF_MATCH

    What form of query can be found in the first SDO_RDF_MATCH function parameter?
    In SPARQL it is possible to use in OPTIONAL keyword, for example
    SELECT ?x ?y ?z
    ?x test:value ?y OPTIONAL {  ?y test:hasIncome ?z }
    I will be given in the result the records which has both triples, but also those for which te second triple is not set. Is it possible to get the same effect in Oracle?
    Thanks for answer.

    We do not yet support the use of OPTIONAL in the query pattern, but the query can be expressed by calling SDO_RDF_MATCH twice and using an outer join.
    For example, consider the example in the documentation (the 'family' model). The following query will select subjects of type 'Male', including those who do not have an address set.
    Melli
    SELECT t1.x Male, t2.y Address
    FROM TABLE(SDO_RDF_MATCH(
    '(?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> :Male)',
    SDO_RDF_Models('family'),
    NULL,
    SDO_RDF_Aliases(SDO_RDF_Alias('','http://www.example.org/family/')),
    null)) t1,
    TABLE(SDO_RDF_MATCH(
    '(?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> :Male)
    (?x :address ?y)',
    SDO_RDF_Models('family'),
    NULL,
    SDO_RDF_Aliases(SDO_RDF_Alias('','http://www.example.org/family/')),
    null)) t2
    where t1.x=t2.x (+)
    ;

  • Problem with SDO_RDF_MATCH query

    hi guys
    I was trying to use test the "FAMILY INFORMATION" example that came with Oracle Spatial (RDF Descripton Framework). I was able to load all the statements present in the manual. But the I got the below error while executing the a query.Below are given the query and the error
    Query:
    SQL> SELECT m MALES
    2 FROM TABLE(SDO_RDF_MATCH(
    3 '(?m rdf:type :Male)',
    4 SDO_RDF_Models('family'), null,
    5 SDO_RDF_Aliases(SDO_RDF_Alias('','http://www.example.org/family/')), null));
    Error :
    ERROR at line 1:
    ORA-20000: RDF_MATCH Query pattern must be a non-null compile-time constant.
    ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 29
    ORA-06512: at line 4
    Can anyone got into the same situation and found the solution.
    Thanks chandra

    hi
    DBA has fixed the problem. But when i executed the query another thing came up.
    Here are steps:
    Query execution:
    SELECT m MALES
    FROM TABLE(SDO_RDF_MATCH(
    '(?m rdf:type :Male)',
    SDO_RDF_Models('family'), null,
    SDO_RDF_Aliases(SDO_RDF_Alias('','http://www.example.org/family/')), null));
    results :
    MALES
    http://www.example.org/family/Tom
    But the result has to be :
    MALES
    http://www.example.org/family/Jack
    http://www.example.org/family/Tom
    Then i added the other statement:
    INSERT INTO family_rdf_data VALUES (14,
    SDO_RDF_TRIPLE_S('family',
    'http://www.example.org/family/Jack',
    'http://www.w3.org/1999/02/22-rdf-syntax-ns#type',
    'http://www.example.org/family/Male'));
    execute Query again:
    SELECT m MALES
    FROM TABLE(SDO_RDF_MATCH(
    '(?m rdf:type :Male)',
    SDO_RDF_Models('family'), null,
    SDO_RDF_Aliases(SDO_RDF_Alias('','http://www.example.org/family/')), null));
    results :
    MALES
    http://www.example.org/family/Jack
    http://www.example.org/family/Tom
    but the problem is when again i close and start a new session in "sql plus" and execute the "SELECT" query i get:
    MALES
    http://www.example.org/family/Tom
    instead of
    MALES
    http://www.example.org/family/Jack
    http://www.example.org/family/Tom
    Any idea why its not pulling both the statements in the first place.
    thanks chandra

  • Query Array Size

    There is a property in Oracle Forms "Query Array Size" that specifies the maximum number of records that Forms Developer should fetch from the database at one time. How to reaslize similar functionality through SQL or PL/SQL.

    hi,
    this is the OracleAS Portal Content Management forum. Please post your question in the Oracle Forms forum
    Forms
    thanks,
    christian

  • Query incremental size from previous incremental 1

    Hi All,
    Is it possible to query a view in the DB to find the incremental size in a DB?
    Trying to figure out how many blocks/data is changed between now and my previous incremental 0 or 1 backup (how big the next backup will be).
    Thanks,

    Pre rman & incrementals you used to go by the amount of redo / change vectors, although this is obv committed & uncommitted data for your point in time recovery.
    If you've already got a level0 and a level1, you should know the delta / backup piece size by checking rc_backup_set. If you reconcile this against the number of redo changes between level0 & level1, it might give you a vague steer in regards backup piece sizings (although TBH there's no substitute for just running it & finding out!) so that you could estimate the next delta
    rc_backup_piece & v$log_history where first_time between the level0 & level1. Would need testing though!!

  • Oracle query output size

    Hi,
    How to findout the sql statement output size...?
    Thanks,
    Edited by: Jaya.ilankovan on Nov 28, 2011 1:26 PM

    Jaya.ilankovan wrote:
    Hi,
    How to findout the sql statement output size...?
    We are having large amount of data in one of my master table, when i run the query it showing large amount of data in that columns. so i required the size of output columns...?
    Note: We dont want table occupied size.
    Thanks,Its not clear what you want. Do you mean to say that when you see the output, its large and doesn't fit properly? If yes than probably you need the formatting of the output. If not, be more precise in telling us what you want along with the database version of yours.
    Aman....

  • Query Result Sizes Using LiveOffice

    I'd like to get a community response on this one:
    Can viewers of this post who have LiveOffice product experience answer a question for me?  I am using the Universe Query functionality to place data into Excel.  The result size is roughly 4500 rows by 6 columns of data.  If I remove a condition in the query to expand the results LiveOffice fails with this error:
    Failed to get the document information. (LO 26315)  Maximum character output size limit reached. Contact your BusinessObjects administrator. (Error: ERR_WIS_30272)(6315)
    After checking in Desktop Intelligence...I found the result size of the failed query to be just under 10,000 rows.
    I've been using LiveOffice for some time now, but this is the first instance where I have attempted to run a large amount of data into Excel.  I wouldn't call 10,000 rows a lot, but it is a lot more than I have done in the past.
    Can users of LiveOffice tell me the largest row result they have thrown into Excel using LiveOffice?  It can be with a report part or straight query.  I tried to provide with a webi report part and got the same failure.
    I've logged this with SAP Support and they're baffled so far...

    Hi Gregg,
    what's the data source behind your universe? Can it be the case that somewhere in your results exists a field that holds more than 32K. As far as I know Excel allows 32 K per cell.
    Regards,
    Stratos

  • Query table size

    Can anyone provide me with a query to find the size of a user defined table? Thanks in advance.

    You can use DBA_SEGMENTS (if you have the proper privileges) or USER_SEGMENTS view to get the information you need.
    Example:
    DBA_SEGMENTS:
    select owner                        
         , segment_name
         , sum(bytes)/1024/1024 as "MBytes"
    from dba_segments
    where owner='SCOTT'
      and segment_name='EMP'
    group by owner
           , segment_name;USER_SEGMENTS only for tables owned by the current/connected user:
    select segment_name
         , sum(bytes)/1024/1024 as "MBytes"
    from user_segments
    where segment_name='EMP'
    group by segment_name;Please keep in mind that these queries will give you the size that is allocated by the specific segment, including the blocks above HWM.
    Many of these blocks might be actually empty.
    To get information about the size of the actual data stored in this table, you have to collect the statistics and play with USER_TABLES/ALL_TABLES/DBA_TABLES views.
    For more information check the discussion on AskTom: How to calculate the actual size of a table?
    Cheers,

  • CS6 - Pattern making. How can I use a bounding box to define the pattern size?

    I want to create a pattern in cs6. As in the previous versions of illustrator, I'd like to be able to use a bounding box to tell the computer where I want the pattern to start etc. In cs6 I can't seem to be able to do this. Once I hit 'make pattern' the bounding box is different and it becomes really difficult to define where I want the pattern to start. The pattern making part of illustrator seems to get confused and ends up throwing out my pattern completely. Any ideas?
    Thanks!

    Zehgut,
    Create a nofill/nostroke rectangle where you want to have the boundaries, then move it down beneath the artwork in the Layers palette and include it in the swatch. That is the way to define the boudaries.

  • Altering blog format and querying page size

    Good morning all
    Two quick questions - I have had a search around the forums for these but haven't found anything relevant, so here are my quesitons:
    1) Is it possible to format the way that blog entries appear on the main blog page? Inspector of course allows small tweaks such as number of entries to show, and length of entries, but I wanted to know if it was possible to perhaps lose the left side photo thumbnail space altogether so that the blog entry/text itself takes up the entire width of the page. Also, is it possible to have the photo-thumbnail link photo on the right hand side of the main blog page, instead of on the left hand side? (Hopefully this question makes sense)
    2. Back in the days of when I used Frontpage, it had a handy little feature which would let you know how large the page you were working on was (in KB) and would tell you how many seconds it would take to load using a dialup modem. Is there any such feature un iWeb (like a "page info" selection?
    Many thanks
    Narly

    Hi Narly,
    In answer to:
    but I wanted to know if it was possible to perhaps lose the left side photo thumbnail space altogether so that the blog entry/text itself takes up the entire width of the page.
    Yes it is, simply delete the picture from the Entry page and it wont show up on the main blog page. You can then insert an image if you want one on the entry page and it will not show up, just dont drop it into the default imageholder (which wont be there because you have deleted it!).
    Also, is it possible to have the photo-thumbnail link photo on the right hand side of the main blog page, instead of on the left hand side?
    Different templates put the picture on different sides.
    2. Not that I am aware of!
    Will
    1GHz G4, 15" PowerBook, Airport Network, 1G iPod Mini   Mac OS X (10.4.6)   www.willg4pb.com for iWeb tips

  • How to query the size of a file?

    as title~
    How can I do?

    Is the return value in bytes?Yep. (Assuming you mean the length of the file in
    bytes: ie 1074 bytes, etc...) If you mean "does it
    return an array of bytes?" ... then no, as in my
    original post, it returns a long.Thanks a lot.

  • Querying character column sizes using DatabaseMetadata

    Hi,
    In a UTF-8 database, I've created two testing tables, one that uses byte length semantics (BLS) for its CHAR and VARCHAR2 columns, and one using character length semantics (CLS). If I use the standard JDBC DatabaseMetdata.getColumns() query, the size of the CLS columns is reported as 4 times that of the BLS columns. I don't believe this is the desired behaviour for the JDBC drivers.
    Regardless, does anyone know a way to accurately determine (preferably using standard JDBC methods) the size of a CHAR or VARCHAR column in characters across different database configurations? I need this to compare column lengths in a ASCII and UTF8 database.
    I'm using the standalone JDBC drivers v9.2.0.3 for JDK1.4 (odjbc.jar) running aginst Oracle 9.2.0.0.
    The following code, which contains some DDL to create sample tables, can be used to dump the column metadata returned by Oracle's database drivers.
    import java.sql.*;
    import java.util.*;
    The following script can be used to create two test tables, the first with
    byte-size columns, and the second with character-size columns.
    CREATE TABLE TMP
    TMP_ID NUMBER(12) NOT NULL PRIMARY KEY,
    TMP_CHAR CHAR(200 BYTE),
    TMP_VCHAR VARCHAR2(100 BYTE)
    CREATE TABLE TMP2
    TMP_ID NUMBER(12) NOT NULL PRIMARY KEY,
    TMP_CHAR CHAR(200 CHAR),
    TMP_VCHAR VARCHAR2(100 CHAR)
    public class DatabaseMetadata
    private static final String COLUMN_NAMES[] = {
    "TABLE_CAT",
    "TABLE_SCHEM",
    "TABLE_NAME",
    "COLUMN_NAME",
    "DATA_TYPE",
    "TYPE_NAME",
    "COLUMN_SIZE",
    "BUFFER_LENGTH",
    "DECIMAL_DIGITS",
    "NUM_PREC_RADIX",
    "NULLABLE",
    "REMARKS",
    "COLUMN_DEF",
    "SQL_DATA_TYPE",
    "SQL_DATETIME_SUB",
    "CHAR_OCTET_LENGTH",
    "ORDINAL_POSITION",
    "IS_NULLABLE"
    private static final int COLUMN_WIDTHS[] = {
    10, // "TABLE_CAT",
    11, // "TABLE_SCHEM",
    10, // "TABLE_NAME",
    11, // "COLUMN_NAME",
    10, // "DATA_TYPE",
    10, // "TYPE_NAME",
    11, // "COLUMN_SIZE",
    13, // "BUFFER_LENGTH",
    13, // "DECIMAL_DIGITS",
    13, // "NUM_PREC_RADIX",
    10, // "NULLABLE",
    10, // "REMARKS",
    10, // "COLUMN_DEF",
    10, // "SQL_DATA_TYPE",
    10, // "SQL_DATETIME_SUB",
    10, // "CHAR_OCTET_LENGTH",
    10, // "ORDINAL_POSITION",
    10, // "IS_NULLABLE"
    private static final char WHITESPACE[] =
    .toCharArray();
    private static final String HYPHENS =
    private static String formatRow(String row[])
    StringBuffer buffer = new StringBuffer(128);
    for (int j=0;j<row.length;j++)
    if (j > 0)
    buffer.append(" | ");
    String text = row[j];
    int width = COLUMN_WIDTHS[j];
    if (text == null)
    buffer.append(WHITESPACE, 0, width);
    else if (text.length() > width)
    buffer.append(text.substring(0, width));
    else
    buffer.append(text).append(WHITESPACE, 0, width - text.length());
    } // j
    return buffer.toString();
    } // private static String formatRow(String[])
    private static void printColumnMetadata(
    DatabaseMetaData metadata, String tableName)
    throws SQLException
    System.out.println("\n" + tableName + "\n");
    System.out.println(formatRow(COLUMN_NAMES));
    String hyphens[] = new String[18];
    Arrays.fill(hyphens, HYPHENS);
    System.out.println(formatRow(hyphens));
    ResultSet results = metadata.getColumns(null, null, tableName, "%");
    String columnMetadata[] = new String[18];
    while (results.next())
    for (int i=0;i<18;i++)
    Object result = results.getObject(i+1);
    columnMetadata[i] = result == null ? "NULL" : result.toString();
    } // i
    System.out.println(formatRow(columnMetadata));
    results.close();
    } // private static void printColumnMetadata(DatabaseMetaData, String)
    public static void main(String argv[])
    throws Exception
    Driver driver = (Driver)Class.forName(
    "oracle.jdbc.driver.OracleDriver").newInstance();
    DriverManager.registerDriver(driver);
    Connection connection = DriverManager.getConnection(
    argv[0], argv[1], argv[2]);
    // ((oracle.jdbc.OracleConnection)connection).setRemarksReporting(true);
    try
    DatabaseMetaData metadata = connection.getMetaData();
    printColumnMetadata(metadata, "TMP");
    printColumnMetadata(metadata, "TMP2");
    catch (SQLException e)
    e.printStackTrace();
    connection.close();
    } // public class DatabaseMetadata

    It appears that this forum uses "[" "i" "]" to denote italics internally, so these characters are missing where the code sample becomes italic, between 'columnMetadata' and '='.

  • How to execute a Query which exceeds 32K size?

    My Stored Procedure has one o/p parameter of REF CURSOR type. Based on the inputs,i'm forming the dynamic query which exceeds 32k size in length. So when i'm executing the proc it throws error.
    How can i execute the procedure contains dynamic query(>32k size) and get the result set through REF CURSOR type o/p parameter?
    I heared that it's possible through DBMS_SQL.PARSE() procedure. If it so, explain me in detail.
    Thanks!

    http://htmldb.oracle.com/pls/otn/f?p=2853:4:9265445064393730839::NO::P4_QA_ID:401

  • Error while executing query longer thank 32K using dbms_sql

    Hi,
    I'm using oracle database version is 10.2.0.4.0
    I've a query of size 41K.
    I can't run it with execute immediate, so when I'm running it with dbms_sql I'm getting error -
    ORA-06502: PL/SQL: numeric or value error.
    But when I'm running it in my pl/sql developer it is running fine.
    Code snippet is below
    -- Created on 24/05/2010 by TSHARMA
    declare
    -- Local variables here
    cursor_name INTEGER;
    i integer;
    tc clob;
    begin
    -- Test statements here
    select col1 into tc from temp where a1 = 't1'; --getting the long query from a temp table
    tc := 'create table temp1 as ' || tc;
    cursor_name := dbms_sql.open_cursor;
    DBMS_SQL.PARSE(cursor_name, tc, DBMS_SQL.NATIVE);
    i := DBMS_SQL.EXECUTE(cursor_name);
    DBMS_SQL.CLOSE_CURSOR(cursor_name);
    end;
    -------------------------------

    Hi,
    DBMS_SQL.PARSE is overloaded to accept a VARCHAR2A as the statement parameter. This is a table of VARCHAR2(32767) which can be built up using your long query. I've written the following to handle long CLOB's. Just call the execute_sql procedure passing in the long sql:
    PROCEDURE execute_sql (p_sql IN CLOB) IS
       l_sql_table DBMS_SQL.VARCHAR2a;
       l_ds_cursor PLS_INTEGER;
       l_ret_val   PLS_INTEGER;
    BEGIN
       l_sql_table := populate_sql_table(p_sql => p_sql);
       l_ds_cursor := DBMS_SQL.OPEN_CURSOR;
       DBMS_SQL.PARSE(l_ds_cursor, l_sql_table, l_sql_table.FIRST, l_sql_table.LAST, FALSE, DBMS_SQL.NATIVE);
       l_ret_val := DBMS_SQL.EXECUTE(l_ds_cursor);
       DBMS_SQL.CLOSE_CURSOR(l_ds_cursor);
    END execute_sql;
    FUNCTION populate_sql_table (p_sql IN CLOB) RETURN DBMS_SQL.VARCHAR2a IS
       l_buffer_length CONSTANT PLS_INTEGER := 32767;
       l_lob_length PLS_INTEGER;
       l_offset PLS_INTEGER := 1;
       l_amount PLS_INTEGER := l_buffer_length;
       l_sql_table DBMS_SQL.VARCHAR2a;
    BEGIN
       l_sql_table.DELETE;
       l_lob_length := DBMS_LOB.GETLENGTH(p_sql);
       LOOP
          IF l_buffer_length > l_lob_length THEN
             l_amount := l_lob_length;
          END IF;
          l_sql_table(NVL(l_sql_table.LAST, 0) + 1) := DBMS_LOB.SUBSTR(p_sql, l_amount, l_offset);
          l_offset := l_offset + l_buffer_length;
          l_lob_length := l_lob_length - l_amount;
          IF l_lob_length <= 0 THEN
             EXIT;
          END IF;
       END LOOP;
       RETURN(l_sql_table);
    END populate_sql_table;Hope that helps

Maybe you are looking for

  • No Sound in Firefox on Windows 7 from YouTube, CNN, CSPAN unless Protected Mode is disabled.

    I have no sound when playing Flash videos on any Windows 7 PCs from the following standard websites - YouTube, CNN, CSPAN and ESPN. Some YouTube videos provide both video and audio if I enable HTML5.  Most do not. CSPAN Videos provide video but no au

  • RMBP Late 2013 Facetime HD Camera Not Working

    Hi there, I have my rMBP since the end of December. When I got it, i needed to update the OS X to 10.9.1. I don't recall if i tried the FaceTime HD Camera later or before the system update, but i'm sure it was working back then. Now it doesn't work.

  • What happened to my e mails

    I just went looking for an old e-mail and it seems with the latest changes to the Verizon e-mail, either my old e-mails are gone or someplace I haven't found. Anyone have a solution?

  • Error in STO while creating Deliveries.

    Hi, When we run VL10B in background few error messages are produced " Material staging date replaced by current date" and its error message. STO contains around 100 line items, but error is produced for some line items only. I tried to find it out wh

  • Emailing or printing to pdf a single worksheet from numbers for ipad.

    I use Numbers for my estimating program for my business and would like to be able to send my proposals directly from Numbers.  Is there a way to email only one worksheet from a numbers file?  Is there a way to print to a pdf from the print screen?