Optimise query on the table which contain 1000 column

Hi ,
I have query on the table which contain 1000 columns
when i am executing query on same table .It is taking time .
Select * from abc
where col1 between start_date and end_date ;
abc table contain 1000 columns.
please tell me how to optimise query

Yeah, that was my thought as well ... 1000 columns? wtf?
I can't think of many reasons for why you'd need to do a select * on it, and the scenarios that would require that are better addressed at the DBA level, perhaps using db replication and the data pump, etc. So to start with try selecting just the data you would need.
One thing you can do right off the bat is to partition that table by date, and also to analyze and run statistics on it (this was a nightly operation at my last job).
You can also create a materialzed view that refreshes overnight, just on the slice of the data you need. Use a forced fast refresh to make it current before you use it.

Similar Messages

  • Please help me to know the tables which contain details of APD and Open hub destination

    Hi experts,
    I need to know the list of APDs that have been created in our system. So can you please let me know the table name (if there is any) which contains the name of the APD and as well as the status (active / inactive) of the APD.
    Thanks ,
    Shalini

    Hi Shalini,
    Go to RSANWB  T-code and select any analysis process. Then press the "monitor" button. On the monitor screen, you can see the selection criteria in a table on the right. Now double-click on the table and a popup will come up where you can set the selection criteria. in particular, you can set the time frame and the analysis process selection.
    Hope it 'll help you..........
    Regards,
    Mukesh

  • Name of  the Table  which contains Debit Credit Fields

    Hii all,
    I have to calculate the net amt of sales performed by all sales offices of my company. i have to take Debit n credit field. Which table should  I refer to get these  fields ?
    Regards
    Shubhra Tiwari
    Edited by: shubhra tiwari on Feb 18, 2008 7:14 AM

    Hi,
    In table LIPS, you have the field CMPRE_FLT for item credit price.
    Reward if Helpful.

  • How can I import data using .dmp into the table which has more columns then in import

    I am building the history for warehouse purpose on Oracle 8i database and want to use the old import (.dmp) files (from oracle 7.3.4) to import data but the underlying table is having few more columns which are not in my old DMP file .. how can I import the data into these altered tables while using the same *.imp files .
    Any solutions ?

    That is the most obvious solution .. but think of the case when my operational database which is the source of my data is undergoing changes every quarter i.e after every 3 months there are some changes on underlying table structures which means structures of my import files will always be different after evry quarter .. you can imagine the number of temporary import structures I need to create .. can't there be a solution wherein I can write an SQL over the import file to read the data in required format ..

  • Find table which contains "job name" and "Mail sent to users"

    Hi Folks,
    I have a requirement” whenever I run a job(xyz), it send mail to users”, Can you please let me know the table which contains both “job name” and “successfully mail sent to users”.
    Thanks in Advance.
    Lakshmi.

    Hi,
    You can find the job name in TBTCJOB.
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • Dynamic SQL statement to select the tables which are updated today...

    Hi Guys,
    I need to find the names of all the tables which contain rows that are inserted/updated in a given time stamp...
    Below statement gives me the list of all the tables in the database...
    select t.table_name from all_tables t;All these tables in the database have a column called rowversion which gives the updated/inserted date of a record. I need to write a select statement (probably dynamic) which will give me the table names which contain the rowversion value 24-01-2013....
    Any help is very much appreciated...

    Napster wrote:
    Hi Karthick,
    Thanks for your reply...
    But when I execute your select statement I am getting an error saying table SYS.DBMS_XMLGEN does not exist.
    Probably something wrong in my environment?Yes you can, here is a quick untested code
    declare
      my_filter date := to_date('24-01-2013', 'dd-mm-yyyy');
      my_count integer;
    begin
      for i in (select table_name from user_tables)
      loop
         execute immediate q'[select count(*) from ]' || i.table_name || q'[ where rowversion = :1]'
         using my_filter
         into my_count;
         if my_count > 0 then
             dbms_output.put_line(i.table_name);
         end if;
      end loop;
    end; 
    /

  • Reg:table which contains open STO's and P2P orders

    Hi,
    Can any body please tell me the table which contains open STO's and P2P orders.
    Thanks&Regards,
    Usha.

    Please refer to table EKPO where field ELIKZ is not equal to "X".
    Regards
    Bhavesh Mistry

  • Table which contains Start & End Destination details

    Hi All,
    I was trying to find out the table which contains the start and end destination details of a mileage claim in Travel Management.
    Can any one let me know the table names.
    Thanks and Regards
    Sri

    Hi Srinivas,
    Thanks for the reply!
    but what iam trying to find out is during mileage claim we usually enter the start destination and end destination . Now i wanted to know where will these details go and get stored as i need to amend some changes on the PDF form and i need to fetch these details to get them displayed.
    Thanks and Regards
    Sri

  • Export dump only 1000 tables from the schema which contains 3000 tables.

    Hi,
    I have an requirement to export the dump only with particular 1000 tables from the schema which contains 3000 tables.
    As I want to take the dump, I need to mention the List of tables in "TABLES" Parameter. But syntax won't allow for 1000 tables.
    Kindly guide me on this to proceed further to take the dump of only particular 1000 tables.
    Thanks in advance.
    Thanks,
    Orahar.

    I have an requirement to export the dump only with particular 1000 tables from the schema which contains 3000 tables.
    As I want to take the dump, I need to mention the List of tables in "TABLES" Parameter. But syntax won't allow for 1000 tables.
    Kindly guide me on this to proceed further to take the dump of only particular 1000 tables.You haven't mentioned the oracle release version.
    if you're using 10g, you could use datapump export/import to achieve this. Not a straight way.
    Check Metalink Export/Import DataPump Parameters INCLUDE and EXCLUDE - How to Load and Unload Specific Objects - 341733.1
    Under section 9. Exporting or Importing a large number of objects.
    HTH
    -Anantha

  • How can i find the tables which dont contain any data under my database ?

    Can you please suggest me a way to find the tables which dont contain any data under my database ?
    Regards,
    Renu

    Can you please suggest me a way to find the tables which dont contain any data under my database ?
    For the schema that you've logged in to, you could do something like this:
    test@XE>
    test@XE> @test
    test@XE> --
    test@XE> set serveroutput on size 1000000
    test@XE>
    test@XE> declare
      2    n_count  number;
      3  begin
      4    for rec in (select object_name from user_objects
      5                where object_type = 'TABLE')
      6    loop
      7      execute immediate 'select count(*) from '||rec.object_name
      8      into n_count;
      9      if (n_count = 0) then
    10        dbms_output.put_line(rec.object_name);
    11      end if;
    12    end loop;
    13  end;
    14  /
    BONUS
    RUN_STATS
    PL/SQL procedure successfully completed.
    test@XE>
    test@XE>For the other schemas, you could query from dba_objects and probably display the owner as well.
    HTH
    isotope

  • Find the schema which contains all these tables

    In my DB, only SCOTT has all the three tables EMP,DEPT, BONUS. There are schemas which have either one or two of these tables but only SCOTT has all these 3 tables.
    To find the schema which contains all these *3* tables. I tried the below mentioned queries which gave the wrong answers.
    1.
    select TABLE_NAME, owner from dba_Tables where table_name IN ('EMP','DEPT', 'BONUS')-- will return any schema which has any of these tables. So, wrong result
    2.
    select TABLE_NAME, owner from dba_Tables where table_name = 'EMP' AND TABLE_NAME='DEPT' AND TABLE_NAME= 'BONUS'-- Wrong result because it is mutually contradictory. As AP has mentioned below, A table_name cannot be equal to all the three tables .
    Edited by: GarryB on Dec 22, 2010 7:56 AM

    Hi,
    GarryB wrote:
    Thanks everyone. So, this means that this seemingly simple query cannot be written with just a plain AND , OR . Right?You're right. Every query needs SELECT and FROM, for example.
    What's wrong with Solomon's simple solution?
    Whatever you don't like about it, I'm sure there's another approach that doesn't have the same problem, even if it is slower and more complicated.
    As AP pointed out, no one row has all the information you need to decide if that row will be part of the result set or not.
    You need something that can make a decision based on the data in multiple rows.
    GROUP BY, like Solomon suggested, is the easiest and most efficient way I know of.
    Anything that GROUP BY does can probably be done by analytic functions. In this case, it will be more complicated and slower, but you can get the same results.
    A self-join, as user13524665 demonstrated, is another way.
    You could also get the results you want using EXISTS-, IN-, or scalar sub-queries, all of which would be even more complicated, and scale just as poorly, as a self-join.
    CONNECT BY, recursive sub-queries, MODEL, and XML functions can also look at several rows at the same time. I don't believe you want to read and test soltuions for all of these any more than I want to write all of them. Solomon gave a good solution for your original problem. If you want to add some extra restrictions to your problem (such as "I can't use ... or ...") explain clearly what those restrictions are, and why you need them.

  • Table which contains name of the report generated from table

    Hello everyone,
    Is there any table which stores the report names that are created from table.
    For example if my table name is 'ABC' a new report will be created for table at run time '/1BCDWB/DB/ABC'.
    I also need to have table names, which stored the values when a layout is changed
    For example if I have ten fields in my table, first time ill choose 5 fields, second time ill change the layout and choose 10 fields and ill save the layout.
    If any Function modules are there please let me know
    Please let me know, if anyone has details.
    Thanks,
    Gayatri.
    Moderator message : Duplicate post locked. Continue with the thread - [Name of the table which stores report contents and layout changes|Name of the table which stores report contents and layout changes;.
    Edited by: Vinod Kumar on Jun 14, 2011 3:42 PM

    Hi,
    Thanks for reply.
    I know about ttxfp and tnapr. but none of the two table contain form name with its description. actully I m looking for a table which contain form name with there desription. please if you have info regarding this, Do share with me . this is really urgent
    regrads,
    Ruchika saini

  • How can i join more than 20 tables which contains more than 5 lacks records

    how can i join more than 20 tables which contains more than 5 lacks records

    If you're trying to join 20 tables I would check:
    - Are all the joins necessary. It's easy sometimes to just join to another table because you're unsure as to whether it's required.
    - What sort of application is it? 20 joins seems a lot to me. Are you trying to achieve too much with one query? Is it possible to break the problem down?
    - If it is necessary to join so many tables then force the use of hash joins in the query, especially if you're processing a lot of data and want the best throughput. If you want a quicker response, this will not be a appropriate.

  • How to create a table which contains relational data and Document data

    hai all
    i need to create a table which contains relational data(i mean coulumns whose data types are type NUMBER,VARCHAR) and documents(like xml file/html file/image)using iFS.
    when i store the document data(xml data/html data) in the iFS ,it will be stored as Document Object.so how do i relate this document object belongs to a particular row in a table.
    do guide me
    thanks

    Please see reply at http://technet.oracle.com:89/ubb/Forum36/HTML/000778.html

  • How to get the records which contains single quotation.

    Hi All,
    I am having one table which contains the name like D'ales,D'silva.
    I have have one filter in APEX as "Name".
    I need to filter it like D' % this . How can i do in apex, the replace command is working in SQL but not in Apex.
    My filter is like this.
    IF :P136_NAME IS NOT NULL THEN
    STR := STR||' AND UPPER( replace(name,'''','''''')) LIKE '''||UPPER(:P136_NAME)||''' ';
    END IF;
    very urgernt
    Thanks in Advance,

    Hi,
    You can use:
    STR := STR || ' AND instr(upper(NAME), upper(nvl(:P136_NAME, NAME))) > 0';Andy

Maybe you are looking for

  • Limit of 10 000 messages for syslog"s

    I am using LMS 3.2  as syslog server. I have set purge settings. Ther is enaughe free space on a disk. But when the nmber of syslog messeges increases up to 10 000. it stops to collect them. So all messages will be lost if it is fool. How can I chang

  • ATV w/ AE & no internet in RV, Airplay issue...

    I have been reading and found that I can use Apple TV and an Airport Express to create a Local network in my RV to connect iOS devices to Apple TV. A lot of the campgrounds we frequent have strong cell (4G) but no internet. My goal would be able to s

  • Risk Analysis and Remediation Mitigating Control Monitoring Alerts

    Hello, We have configured an alert for a Mitigating Control.  The Monitor must execute the report every day (report frequency = 1) or an alert email is sent to the Risk Owner. The Risk Owner recieves the Alert email and the Alert is logged on the Ale

  • Photoshop Trial. Error 11

    After installing the photoshop trial I get this error message. "Some of the application components are missing from the Application directory, Please reinstall the application." Already reinstalled twice. Does anybody know how to solve this problem?

  • I can't download any apps on my iPad

    When I press the 'get' button it comes up with 'install' after I press this there is a spinning circle then comes up saying 'get' all over again but the app hasn't downloaded. I Have tried turning off and on again, also signing in and out of the App