Analyse a partitioned table with more than 50 million rows

Hi,
I have a partitioned table with more than 50 million rows. The last analyse is on 1/25/2007. Do I need to analyse him? (query runs on this table is very slow).
If I need to analyse him, what is the best way? Use DBMS_STATS and schedule a job?
Thanks

A partitioned table has global statistics as well as partition (and subpartition if the table is subpartitioned) statistics. My guess is that you mean to say that the last time that global statistics were gathered was in 2007. Is that guess accurate? Are the partition-level statistics more recent?
Do any of your queries actually use global statistics? Or would you expect that every query involving this table would specify one or more values for the partitioning key and thus force partition pruning to take place? If all your queries are doing partition pruning, global statistics are irrelevant, so it doesn't matter how old and out of date they are.
Are you seeing any performance problems that are potentially attributable to stale statistics on this table? If you're not seeing any performance problems, leaving the statistics well enough alone may be the most prudent course of action. Gathering statistics would only have the potential to change query plans. And since the cost of a query plan regressing is orders of magnitude greater than the benefit of a different query performing faster (at least for most queries in most systems), the balance of risks would argue for leaving the stats alone if there is no problem you're trying to solve.
If your system does actually use global statistics and there are performance problems that you believe are potentially attributable to stale global statistics and your partition level statistics are accurate, you can gather just global statistics on the table probably with a reasonably small sample size. Make sure, though, that you back up your existing statistics just in case a query plan goes south. Ideally, you'd also have a test environment with identical (or nearly identical) data volumes that you could use to verify that gathering statistics doesn't cause any problems.
Justin

Similar Messages

  • General Scenario- Adding columns into a table with more than 100 million rows

    I was asked/given a scenario, what issues do you encounter when you try to add new columns to a table with more than 200 million rows? How do you overcome those?
    Thanks in advance.
    svk

    For such a large table, it is better to add the new column to the end of the table to avoid any performance impact, as RSingh suggested.
    Also avoid to use any default on the newly created statement, or SQL Server will have to fill up 200 million fields with this default value. If you need one, add an empty column and update the column by using small batches (otherwise you lock up the whole
    table). Add the default after all the rows have a value for the new column.

  • Error while running spatial queries on a table with more than one geometry.

    Hello,
    I'm using GeoServer with Oracle Spatial database, and this is a second time I run into some problems because we use tables with more than one geometry.
    When GeoServer renders objects with more than one geometry on the map, it creates a query where it asks for objects which one of the two geometries interacts with the query window. This type of query always fails with "End of TNS data channel" error.
    We are running Oracle Standard 11.1.0.7.0.
    Here is a small script to demonstrate the error. Could anyone confirm that they also have this type of error? Or suggest a fix?
    What this script does:
    1. Create table object1 with two geometry columns, geom1, geom2.
    2. Create metadata (projected coordinate system).
    3. Insert a row.
    4. Create spacial indices on both columns.
    5. Run a SDO_RELATE query on one column. Everything is fine.
    6. Run a SDO_RELATE query on both columns. ERROR: "End of TNS data channel"
    7. Clean.
    CREATE TABLE object1
    id NUMBER PRIMARY KEY,
    geom1 SDO_GEOMETRY,
    geom2 SDO_GEOMETRY
    INSERT INTO user_sdo_geom_metadata (table_name, column_name, srid, diminfo)
    VALUES
    'OBJECT1',
    'GEOM1',
    2180,
    SDO_DIM_ARRAY
    SDO_DIM_ELEMENT('X', 400000, 700000, 0.05),
    SDO_DIM_ELEMENT('Y', 300000, 600000, 0.05)
    INSERT INTO user_sdo_geom_metadata (table_name, column_name, srid, diminfo)
    VALUES
    'OBJECT1',
    'GEOM2',
    2180,
    SDO_DIM_ARRAY
    SDO_DIM_ELEMENT('X', 400000, 700000, 0.05),
    SDO_DIM_ELEMENT('Y', 300000, 600000, 0.05)
    INSERT INTO object1 VALUES(1, SDO_GEOMETRY(2001, 2180, SDO_POINT_TYPE(500000, 400000, NULL), NULL, NULL), SDO_GEOMETRY(2001, 2180, SDO_POINT_TYPE(550000, 450000, NULL), NULL, NULL));
    CREATE INDEX object1_geom1_sidx ON object1(geom1) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    CREATE INDEX object1_geom2_sidx ON object1(geom2) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    SELECT *
    FROM object1
    WHERE
    SDO_RELATE("GEOM1", SDO_GEOMETRY(2001, 2180, SDO_POINT_TYPE(500000, 400000, NULL), NULL, NULL), 'MASK=ANYINTERACT') = 'TRUE';
    SELECT *
    FROM object1
    WHERE
    SDO_RELATE("GEOM1", SDO_GEOMETRY(2001, 2180, SDO_POINT_TYPE(500000, 400000, NULL), NULL, NULL), 'MASK=ANYINTERACT') = 'TRUE' OR
    SDO_RELATE("GEOM2", SDO_GEOMETRY(2001, 2180, SDO_POINT_TYPE(500000, 400000, NULL), NULL, NULL), 'MASK=ANYINTERACT') = 'TRUE';
    DELETE FROM user_sdo_geom_metadata WHERE table_name = 'OBJECT1';
    DROP INDEX object1_geom1_sidx;
    DROP INDEX object1_geom2_sidx;
    DROP TABLE object1;
    Thanks for help.

    This error appears in GeoServer and SQLPLUS.
    I have set up a completly new database installation to test this error and everything works fine. I tried it again on the previous database but I still get the same error. I also tried to restart the database, but with no luck, the error is still there. I geuss something is wrong with the database installation.
    Anyone knows what could cause an error like this "End of TNS data channel"?

  • Tables with more than one cell with a high number of rowspan (ej. 619). This cell can not be print in a page and it must be cut. But I don't know how  indesign can do this action.

    Tables with more than one cell with a high number of rowspan (ej. 619). This cell can not be print in a page and it must be cut. But I don’t know how  indesign can do this action.

    set the wake-on lan on the main computer
    The laptop's too far away from the router to be connected by ethernet. It's all wifi.
    No separate server app on the laptop, it's all samba
    The files are on a windows laptop and a hard drive hooked up to the windows laptop. The windows share server is pants, so I'd need some sort of third party server running. Maybe you weren't suggesting to use Samba to connect to the windows share though?
    I'm glad that you've all understood my ramblings and taken and interest, thanks The way I see it, I can't be the only netbook user these days looking for this kind of convenience, and I certainly won't be once chrome and moblin hit the market.
    Last edited by saft (2010-03-18 20:38:08)

  • Table with more than 35 columns

    Hello All.
    How can one work with a table with more than 35 columns
    on JDev 9.0.3.3?
    My other question is related to this.
    Setting Entities's Beans properties from a Session Bean
    bought up the error, but when setting from inside the EJB,
    the bug stays clear.
    Is this right?
    Thank you

    Thank you all for reply.
    Here's my problem:
    I have an AS400/DB2 Database, a huge and an old one.
    There is many COBOL Programs used to communicate with this DB.
    My project is to transfer the database with the same structure and the same contents to a Linux/ORACLE System.
    I will not remake the COBOL Programs. I will use the existing one on the Linux System.
    So the tables of the new DB should be the same as the old one.
    That’s why I can not make a relational DB. I have to make an exact migration.
    Unfortunately I have some tables with more than 5000 COLUMNS.
    Now my question is:
    can I modify the parameters of the ORACE DB to make it accept Tables and Views with more than 1000 columns, If not, is it possible to make a PL/SQL Function that simulate a table, this function will insert/update/select data from many other small tables (<1000 columns). I want to say a method that make the ORACLE DB acting like if it has a table with a huge number of columns;
    I know it's crazy but any idea please.

  • Spatial index creation for table with more than one geometry columns?

    I have table with more than one geometry columns.
    I'v added in user_sdo_geom_metadata table record for every column in the table.
    When I try to create spatial indexes over geometry columns in the table - i get error message:
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13203: failed to read USER_SDO_GEOM_METADATA table
    ORA-13203: failed to read USER_SDO_GEOM_METADATA table
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 8
    ORA-06512: at line 1
    What is the the solution?

    I'v got errors in my user_sdo_geom_metadata.
    The problem does not exists!

  • I want to enable a PK in a tables with more than 1680 subpartitions

    Hi All
    i want to enable a PK in a tables with more than 1680 subpartitions
    SQL> ALTER SESSION ENABLE PARALLEL DDL ;
    Session altered.
    SQL> alter table FDW.GL_JE_LINES_BASE_1 enable constraint GL_JE_LINES_BASE_1_PK parallel 8;
    alter table FDW.GL_JE_LINES_BASE_1 enable constraint GL_JE_LINES_BASE_1_PK parallel 8
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> alter table FDW.GL_JE_LINES_BASE_1 enable constraint GL_JE_LINES_BASE_1_PK parallel 8 nologging;
    alter table FDW.GL_JE_LINES_BASE_1 enable constraint GL_JE_LINES_BASE_1_PK parallel 8 nologging
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> alter table FDW.GL_JE_LINES_BASE_1 parallel 8;
    Table altered.
    SQL> alter table FDW.GL_JE_LINES_BASE_1 enable constraint GL_JE_LINES_BASE_1_PK;
    alter table FDW.GL_JE_LINES_BASE_1 enable constraint GL_JE_LINES_BASE_1_PK
    ERROR at line 1:
    ORA-01652: unable to extend temp segment by 128 in tablespace TS_FDW_DATA
    Please advice or tell how it would be the best way to do this
    Regards
    Jesus

    When you try to create a PK you automaticaly created an index. If you want to put this index in different tablespace you should use 'using index..' option when you create this primary key.

  • Row chaining in table with more than 255 columns

    Hi,
    I have a table with 1000 columns.
    I saw the following citation: "Any table with more then 255 columns will have chained
    rows (we break really wide tables up)."
    If I insert a row populated with only the first 3 columns (the others are null), is a row chaining occurred?
    I tried to insert a row described above and no row chaining occurred.
    As I understand, a row chaining occurs in a table with 1000 columns only when the populated data increases
    the block size OR when more than 255 columns are populated. Am I right?
    Thanks
    dyahav

    user10952094 wrote:
    Hi,
    I have a table with 1000 columns.
    I saw the following citation: "Any table with more then 255 columns will have chained
    rows (we break really wide tables up)."
    If I insert a row populated with only the first 3 columns (the others are null), is a row chaining occurred?
    I tried to insert a row described above and no row chaining occurred.
    As I understand, a row chaining occurs in a table with 1000 columns only when the populated data increases
    the block size OR when more than 255 columns are populated. Am I right?
    Thanks
    dyahavYesterday, I stated this on the forum "Tables with more than 255 columns will always have chained rows." My statement needs clarification. It was based on the following:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28318/schema.htm#i4383
    "Oracle Database can only store 255 columns in a row piece. Thus, if you insert a row into a table that has 1000 columns, then the database creates 4 row pieces, typically chained over multiple blocks."
    And this paraphrase from "Practical Oracle 8i":
    V$SYSSTAT will show increasing values for CONTINUED ROW FETCH as table rows are read for tables containing more than 255 columns.
    Related information may also be found here:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/c11schem.htm
    "When a table has more than 255 columns, rows that have data after the 255th column are likely to be chained within the same block. This is called intra-block chaining. A chained row's pieces are chained together using the rowids of the pieces. With intra-block chaining, users receive all the data in the same block. If the row fits in the block, users do not see an effect in I/O performance, because no extra I/O operation is required to retrieve the rest of the row."
    http://download.oracle.com/docs/html/B14340_01/data.htm
    "For a table with several columns, the key question to consider is the (average) row length, not the number of columns. Having more than 255 columns in a table built with a smaller block size typically results in intrablock chaining.
    Oracle stores multiple row pieces in the same block, but the overhead to maintain the column information is minimal as long as all row pieces fit in a single data block. If the rows don't fit in a single data block, you may consider using a larger database block size (or use multiple block sizes in the same database). "
    Why not a test case?
    Create a test table named T4 with 1000 columns.
    With the table created, insert 1,000 rows into the table, populating the first 257 columns each with a random 3 byte string which should result in an average row length of about 771 bytes.
    SPOOL C:\TESTME.TXT
    SELECT
      SN.NAME,
      MS.VALUE
    FROM
      V$MYSTAT MS,
      V$STATNAME SN
    WHERE
      SN.NAME = 'table fetch continued row'
      AND SN.STATISTIC#=MS.STATISTIC#;
    INSERT INTO T4 (
    COL1,
    COL2,
    COL3,
    COL255,
    COL256,
    COL257)
    SELECT
    DBMS_RANDOM.STRING('A',3),
    DBMS_RANDOM.STRING('A',3),
    DBMS_RANDOM.STRING('A',3),
    DBMS_RANDOM.STRING('A',3)
    FROM
      DUAL
    CONNECT BY
      LEVEL<=1000;
    SELECT
      SN.NAME,
      MS.VALUE
    FROM
      V$MYSTAT MS,
      V$STATNAME SN
    WHERE
      SN.NAME = 'table fetch continued row'
      AND SN.STATISTIC#=MS.STATISTIC#;
    SET AUTOTRACE TRACEONLY STATISTICS
    SELECT
    FROM
      T4;
    SET AUTOTRACE OFF
    SELECT
      SN.NAME,
      SN.STATISTIC#,
      MS.VALUE
    FROM
      V$MYSTAT MS,
      V$STATNAME SN
    WHERE
      SN.NAME = 'table fetch continued row'
      AND SN.STATISTIC#=MS.STATISTIC#;
    SPOOL OFFWhat are the results of the above?
    Before the insert:
    NAME                      VALUE                                                
    table fetch continue        166
    After the insert:
    NAME                      VALUE                                                
    table fetch continue        166                                                
    After the select:
    NAME                 STATISTIC#      VALUE                                     
    table fetch continue        252        332  Another test, this time with an average row length of about 12 bytes:
    DELETE FROM T4;
    COMMIT;
    SPOOL C:\TESTME2.TXT
    SELECT
      SN.NAME,
      MS.VALUE
    FROM
      V$MYSTAT MS,
      V$STATNAME SN
    WHERE
      SN.NAME = 'table fetch continued row'
      AND SN.STATISTIC#=MS.STATISTIC#;
    INSERT INTO T4 (
      COL1,
      COL256,
      COL257,
      COL999)
    SELECT
    DBMS_RANDOM.STRING('A',3),
    DBMS_RANDOM.STRING('A',3),
    DBMS_RANDOM.STRING('A',3),
    DBMS_RANDOM.STRING('A',3)
    FROM
      DUAL
    CONNECT BY
      LEVEL<=100000;
    SELECT
      SN.NAME,
      MS.VALUE
    FROM
      V$MYSTAT MS,
      V$STATNAME SN
    WHERE
      SN.NAME = 'table fetch continued row'
      AND SN.STATISTIC#=MS.STATISTIC#;
    SET AUTOTRACE TRACEONLY STATISTICS
    SELECT
    FROM
      T4;
    SET AUTOTRACE OFF
    SELECT
      SN.NAME,
      SN.STATISTIC#,
      MS.VALUE
    FROM
      V$MYSTAT MS,
      V$STATNAME SN
    WHERE
      SN.NAME = 'table fetch continued row'
      AND SN.STATISTIC#=MS.STATISTIC#;
    SPOOL OFFWith 100,000 rows each containing about 12 bytes, what should the 'table fetch continued row' statistic show?
    Before the insert:
    NAME                      VALUE                                                
    table fetch continue        332 
    After the insert:
    NAME                      VALUE                                                
    table fetch continue        332
    After the select:
    NAME                 STATISTIC#      VALUE                                     
    table fetch continue        252      33695The final test only inserts data into the first 4 columns:
    DELETE FROM T4;
    COMMIT;
    SPOOL C:\TESTME3.TXT
    SELECT
      SN.NAME,
      MS.VALUE
    FROM
      V$MYSTAT MS,
      V$STATNAME SN
    WHERE
      SN.NAME = 'table fetch continued row'
      AND SN.STATISTIC#=MS.STATISTIC#;
    INSERT INTO T4 (
      COL1,
      COL2,
      COL3,
      COL4)
    SELECT
    DBMS_RANDOM.STRING('A',3),
    DBMS_RANDOM.STRING('A',3),
    DBMS_RANDOM.STRING('A',3),
    DBMS_RANDOM.STRING('A',3)
    FROM
      DUAL
    CONNECT BY
      LEVEL<=100000;
    SELECT
      SN.NAME,
      MS.VALUE
    FROM
      V$MYSTAT MS,
      V$STATNAME SN
    WHERE
      SN.NAME = 'table fetch continued row'
      AND SN.STATISTIC#=MS.STATISTIC#;
    SET AUTOTRACE TRACEONLY STATISTICS
    SELECT
    FROM
      T4;
    SET AUTOTRACE OFF
    SELECT
      SN.NAME,
      SN.STATISTIC#,
      MS.VALUE
    FROM
      V$MYSTAT MS,
      V$STATNAME SN
    WHERE
      SN.NAME = 'table fetch continued row'
      AND SN.STATISTIC#=MS.STATISTIC#;
    SPOOL OFFWhat should the 'table fetch continued row' show?
    Before the insert:
    NAME                      VALUE                                                
    table fetch continue      33695
    After the insert:
    NAME                      VALUE                                                
    table fetch continue      33695
    After the select:
    NAME                 STATISTIC#      VALUE                                     
    table fetch continue        252      33695 My statement "Tables with more than 255 columns will always have chained rows." needs to be clarified:
    "Tables with more than 255 columns will always have chained rows +(row pieces)+ if a column beyond column 255 is used, but the 'table fetch continued row' statistic +may+ only increase in value if the remaining row pieces are found in a different block."
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.
    Edited by: Charles Hooper on Aug 5, 2009 9:52 AM
    Paraphrase misspelled the view name "V$SYSSTAT", corrected a couple minor typos, and changed "will" to "may" in the closing paragraph as this appears to be the behavior based on the test case.

  • Compressed tables with more than 255 columns

    hi,
    Would anyone have a sql to find out compressed tables with more than 255 columns.
    Thank you
    Jonu

    SELECT table_name,
           Count(column_name)
    FROM   user_tab_columns utc
    WHERE  utc.table_name IN (SELECT table_name
                              FROM   user_tables
                              WHERE  compression = 'ENABLED')
    HAVING Count(column_name) > 255
    GROUP  BY table_name

  • How can we create a table with more than 64 fields in the default DB?

    Dear sirs,
    I am taking part in the process of migrating a J2ee application from JBoss to SAP Server. I have imported the ejb project.
    I have an entity bean with 79 CMP fields. i have created the bean and created the table for the same also. but when i tried to build the dictionary, i am getting an error message as given below,
    "Dictionary Generation: DB2:checkNumberOfColumns (primary key of table IMP_MANDANT): number of columns (79) greater than allowed maximum (64) IMP_MANDANT.dtdbtable MyAtlasDictionary/src/packages"
    Is it mean that we can not create tables with fields more than 64?
    How can i create tables with more than 64 fields?
    Kindly help,
    Thankyou,
    Sudheesh...

    Hi,
      I found a link in the help site which says its 1024 (without key 1023).
    http://help.sap.com/saphelp_nw04s/helpdata/en/f6/069940ccd42a54e10000000a1550b0/content.htm
      Not sure about any limit of 64 columns.
    Regards,
    S.Divakar

  • Not able to create a table with more than 64 fields in dictionary

    Hi,
    I have created a java dictionary in Netweaver Developer studio. I have to create a table with more than 64 fields in it. I was able to create the table in dictionary, but when i tried to build it, I am getting an error message as "more than 64 fields are not allowed". If i create the table with 64 fields or below 64 fields, i can build the dictionary and deploy it.
    That is, when i create a table with more than 64 fieds, I am not able to compile the dictionary, But if i reduce the fields to 64 or below, i can compile the dictionary.
    Kindly help me to solve the problem.
    Regards,
    Sudheesh

    Hi,
    Sudheesh,as far as I am aware creating of fields in the table actually depends on the total width of table that can be used for various Vendors.
    So I actually tried out creating a table with too many fields,and I am reproducing the errors which I have obtained -
    <i>Error               Dictionary Generation: <b>DB2:checkWidth TMP_1: total width of table (198198 bytes) greater than allowed maximum (32696 bytes)</b>     TMP_1.dtdbtable     TestDictionary/src/packages     
    Error               Dictionary Generation: <b>DB4:Table TMP_1: fixed length: 198366 (32767).</b>     TMP_1.dtdbtable     TestDictionary/src/packages     
    Error               Dictionary Generation: <b>DB6:checkWidth TMP_1: total width of table (297200) including row overhead is greater than the allowed maximum for 16K tablespaces .</b>     TMP_1.dtdbtable     TestDictionary/src/packages     
    Error               Dictionary Generation: <b>MSSQL:checkWidth TMP_1: total width(198215) greater than allowed maximum (8060)</b>     TMP_1.dtdbtable     TestDictionary/src/packages     
    Error               Dictionary Generation: <b>SAPDB:checkWidth TMP_1: total width(198297) greater than allowed maximum (8088)</b>     TMP_1.dtdbtable     TestDictionary/src/packages     
    Error               Dictionary Generation: Table TMP_1 is not generated     TMP_1.dtdbtable     TestDictionary/src/packages     </i>
    I hope you can understand what the errors state.I am trying to create a table whose total width(sum of width all columns) is greater than the maximum allowed for various Vendors,such as DB2,MSSQL,SAPDB etc.
    I hope this answer helps you create your table suitably
    Regards,
    Harish
    (Please award points if this answer has been usefull)

  • How to read an internal table with more than  one (2 or 3) key field(s).

    how to read an internal table with more than  one (2 or 3) key field(s). in ecc 6.0 version

    hi ,
    check this..
    report.
    tables: marc,mard.
    data: begin of itab occurs 0,
          matnr like marc-matnr,
          werks like marc-werks,
          pstat like marc-pstat,
          end of itab.
    data: begin of itab1 occurs 0,
          matnr like mard-matnr,
          werks like mard-werks,
          lgort like mard-lgort,
          end of itab1.
    parameters:p_matnr like marc-matnr.
    select matnr
           werks
           pstat
           from marc
           into table itab
           where matnr = p_matnr.
    sort itab by matnr werks.
    select matnr
           werks
           lgort
           from mard
           into table itab1
           for all entries in itab
           where matnr = itab-matnr
           and werks = itab-werks.
    sort itab1 by matnr werks.
    loop at itab.
    read table itab1 with key matnr = itab-matnr
                              werks = itab-werks.
    endloop.
    regards,
    venkat.

  • Categorize a table with more than 500 formulas or unique values.

    How comes you can't categorize a table with more than 500 formulas or unique values? Can you change this?

    This error appears in GeoServer and SQLPLUS.
    I have set up a completly new database installation to test this error and everything works fine. I tried it again on the previous database but I still get the same error. I also tried to restart the database, but with no luck, the error is still there. I geuss something is wrong with the database installation.
    Anyone knows what could cause an error like this "End of TNS data channel"?

  • Can I create a table with more than 40 columns ?

    Hello,
    I need to organize my work with a table and need about 66 columns. I am not very good with Numbers but I know a little bit of Pages. I cannot find a way to create a table with more than 40 columns... Is it hopeless ? (Pages '08 v. 3.0.3)
    Thank you all

    It's never too late to try to teach users that the Search feature is not only for helpers.
    The number of columns allowed in Numbers is not a relevant value when the question is about Pages '08 tables.
    I tried to copy a 256 columns Numbers table into a Pages '09 document.
    I didn't got a table but values separated by TABs.
    I tried to convert this text range in a table and got this clear message :
    If I remember well, in Pages '08, the limit is 40 columns.
    It seems that you are a specialist of inaccurate responses, but I'm not a moderator so I'm not allowed to urtge you to double check what you wrote before posting.
    Yvan KOENIG (VALLAURIS, France) vendredi 29 avril 2011 14:57:58
    Please :
    Search for questions similar to your own before submitting them to the community

  • Trouble with the SQL smt to :list tables having more than 1000 rows

    Please I trying to list only tables having more than 1000 rows, but the sql stmt below doesn't work, can someone gives me a tips
    select table_name from user_tables where table_name in ( select table_name from user_tables where rownum > 1000 ) : The result is no rows!
    But I know that I have at lest 50 tables having more than 1000 rows
    Thanks a lot for the help

    If your tables are reasonably analyzed, then you can simply query:
    SELECT table_name,
           num_rows
      FROM user_tables
    WHERE num_rows >= 1000This will give you quite a reasonable estimate.
    Otherwise you have to go for dynamic sql or use the data dictionary to help you generate suitable scripts ....

Maybe you are looking for