Can i  create IN/UP/DE Trigger on a existing table having more than 2L rows

Hi All,
Can i create a INSERT/UPDATE/DELETE Trigger on a existing table having more than 2 lacs records ? if yes (is that works for only some kind of triggers? or for all ?). if not, tell me the reasons and limitations with guidelines.
Thanks in Advance.

Hi,
Sure; you can create new triggers for tables that already have rows. The type of trigger and the number of rows already in the table don't matter.
Try it. If the trigger works with a small table in your Development database, then there's no reason to expect it won't work on a larger table in your Production datbase.

Similar Messages

  • Trigger to insert unique data into other table (having more than 40 millions of records) - MYSQL

    Hi All,
    i am facing impact of trigger in MYSQL, scenario is this:
    I am Having one table with duplicate records that is consist of (eid,tin,status and some other columns are also there but i need only these three).  there is another table which is having same these three columns (eid, tin, status).
    eid and tin will be same for given combination only status will be different i.e.
    1245 23 0
    1245 23 1
    1245 23 5
    1233 33 3
    1211 24 2
    1211 24 5
    so as per above example i have to feed data into other table as
    1245 23 0
    1233 33 3
    1211 24 5
    priority of status is like 0 will be inserted if that is present in record otherwise it will be decrease from 5 to 1.
    so i have designed trigger for this which will insert data after reading each row, but it is taking around 6.5 minutes for inserting 300000 records. so is there any other way to improve performance  for this mysql program.
    DELIMITER $$
    CREATE
        /*[DEFINER = { user | CURRENT_USER }]*/
        TRIGGER `kyr_log`.`upd_status` AFTER INSERT
        ON `kyr_log`.`kyrlog_bup`
        FOR EACH ROW
        BEGIN
    DECLARE v_eid VARCHAR(28);
    DECLARE v_status INT(11);
    SELECT kyrl_eid,kyrl_status INTO v_eid,v_status FROM kyrlog_bup ORDER BY kyrl_id DESC LIMIT 1;
       IF v_eid NOT IN (SELECT kyrl_eid FROM update_status.new_status) THEN
    INSERT INTO update_status.new_status(kyrl_eid,kyrl_tin,kyrl_status)
    SELECT kyrl_eid,kyrl_tin,kyrl_status FROM kyrlog_bup ORDER BY kyrl_id DESC LIMIT 1;
       ELSE IF v_status=2 THEN
    IF v_status > ANY (SELECT kyrl_status FROM kyrlog_bup WHERE kyrl_eid=v_eid AND kyrl_status<>0) THEN
              UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid;
    END IF;
       ELSE IF v_status=3 THEN
    IF v_status > ANY (SELECT kyrl_status FROM kyrlog_bup WHERE kyrl_eid=v_eid AND kyrl_status<>0) THEN
              UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid;  
    END IF;
       ELSE IF v_status=4 THEN
    IF v_status > ANY (SELECT kyrl_status FROM kyrlog_bup WHERE kyrl_eid=v_eid AND kyrl_status<>0) THEN
               UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid; 
    END IF;
       ELSE IF v_status=5 THEN
    IF v_status > ANY (SELECT kyrl_status FROM kyrlog_bup WHERE kyrl_eid=v_eid AND kyrl_status<>0) THEN
               UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid;
    END IF;
               ELSE IF v_status=0 THEN
    UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid;            
              END IF;
           END IF;
           END IF;
           END IF;
           END IF;
           END IF;
        END;
    $$
    DELIMITER ;
    please suggest me if there is  possibility of any other solution.
    thanks

    actually you didn't have seen discussion on this link , there are many discussion related to MYSQL . and mysql is owned by oracle. so i post it here.
    thanks for suggestion

  • Create pagination for table contain more than 2 PK

    Guys;
    Is there any way to use the wizard for creating FORM PAGINATION for tables having more than 2 PK??
    Regards;

    Hi dimitri;
    after the user login & start using this form thiswhat should happen to these 3 PKs:
    -1st PK will be a unique number for the questions.
    -2nd PK should be the ID for each survey ( created as global variable in Zero Page ).
    -3rd PK will be the division for this user (also created as a global variable in ZERO PAGE)..so this is the only field which will nt be changed while the user is logged..
    i tried to use the 1st 2 PKs...& set the last one to get a default value..it worked in the begining but gave me the 1st record for each Survey but my problem that i couldnt navigate to the 2nd record..& after that once i log out & relogin it willnt give me anything.
    Regards;
    ehammad

  • Can I create a Stored Procedure That access data from tables of another servers?

    I'm developing a procedure and within it I'm trying to access another server and make a select into a table that belongs to this another server. When I compile this procedure I have this error message: " PLS-00904: insufficient privilege to access object BC.CADPAP", where BC.CADPAP is the problematic table.
    How can I use more than one connection into an Oracle Stored Procedure?
    How I can access tables of a server from a Stored Procedure since the moment I'm already connected with another server?
    Can I create a Stored Procedure That access data from tables of another servers?

    You need to have a Database Link between two servers. Then you could do execute that statement without any problem. Try to create a database link with the help of
    CREATE DATABASE LINK command. Refer Document for further details

  • 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

  • Can i create an entity bean to part of a table

    Hi there,
    I am using EJB 2.0.
    Can i create an entity bean to part of a table.
    Thanks
    Edited by: vamseebobby on Nov 5, 2007 11:11 AM

    of course,provided the other parts left out have not constraints.
    sumelong

  • 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

  • Can't insert more than 8000 rows to excel via JOB

    Hello, 
    I have SSIS package where I have two tasks.
    File System task copies file (with header names) to destination folder.
    Data flow task export data from table to copied Excel file. Select are simple "select * from table" without any filters.
    There are about 100 000 rows in the table.
    When I run this task through Visual studio everything works fine. Data to Excel file is exported.
    When I run this package in JOB (Job Activity Monitor) the file is created but 0 rows is exported.
    One interesting thing, that when I use select "select top 7000 * from table" 7000 rows is inserted but when I try to export more than 8000 rows then 0 rows is exported. The JOB generates 0 errors. In fact he tries to export. Because all the time
    Excel's file "Date modified" is changing.
    It seems like data is exported but the final "commit" isn't done. Anybody knows where could be a problem?

    Out of curiosity I have had a go at reading 70K lines of data from a table in a sql server and exporting them to an excel 2007 file:
    SSIS 2012 project deployment
    2 project connections: sql database connection for source
    and an Excel 2007 connection for destination:
    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=F:\Data\Outbox\ExcelOut.xlsx;Extended Properties="Excel 12.0 XML;HDR=YES";
    I have an empty excel 2007 file as template with header rows in the first sheet.
    I test the project in VS 2012, ran without problems. 
    I set DelayValidation to true on package level, data flow level.
    In data flow, excel distination, ValidataExternal metadata to False. 
    I deploy the project with the package to an Integration Services catalog on a SQL 2012 server (not my development machine)
    I copy an empty excel 2007 file (with the headers in the first row) in the correct file location.
    I execute the package from SSMS in the Integration services catalogs, with 32 bit checked.
    The package runs without errors. 
    I can open the excel file and see 70K records.
    Last thought: I have no NULL values in my data. Do you have null values after the first 7000 records? Or is one of the excel columns expecting numerical data where it suddenly finds alfanumeric after 7000 rows?
    Another suggestion: if you run the package with SSMS from the catalog, you can set the verbose reporting mode on, does that tell you anything more?
    Jan D'Hondt - SQL server BI development

  • 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 create a user defined type base on existing table

    Hi Everyone,
    Are there any way to create a user defined type base on existing table us as :
    CREATE OR REPLACE Type MyTable Is Table Of PART%ROWTYPE;
    where Part is a table.
    Regards,
    JDang

    Hi JDAng,
    Can't be done. %ROWTYPE is a PL/SQL construct, and as such cannot be used in SQL.
    Regards
    Peter

  • I need to connect my iPad to a projector and USB ports. What do I need to do this and where can I get the suitable fittings? I really need to have more than one USB connection port. Help

    I need to connect my iPad to a projector and have USB ports. What do I need to do this and where can I get the suitable fittings? I really need to have more than one USB connection port. Help

    You can connect via a cable or wireless using an Apple TV.
    http://ipad.about.com/od/iPad_Guide/a/How-To-Connect-Your-Ipad-To-Your-Tv.htm
    Connect an iPad to a Television or Projector
    http://www.everymac.com/systems/apple/ipad/ipad-faq/how-to-connect-ipad-to-tv-te levision-projector.html
    Connecting iPad iPhone or iPod to TV or Projector
    http://www.disabled-world.com/assistivedevices/computer/ipad-tv.php
    iPad Accessories: Connections for a TV or Projector
    http://www.dummies.com/how-to/content/ipad-accessories-connections-for-a-tv-or-p rojector.html
    You may be interested in AirPlay on the Apple TV:
    http://www.apple.com/airplay/
    Alternately, there are Apple Digital AV Adapters for hardwired connections:
    http://support.apple.com/kb/ht4108
    If your location does’t have wifi to use with the Apple TV, use a portable router.
    Portable routers http://compnetworking.about.com/od/routers/tp/travel_routers.htm
     Cheers, Tom

  • Cannot create graph with more than 4000 rows or colume

    need some help.
    im trying to plot a graph using the report generation toolkit and i got this error and it say it cannot contain more than 4000 rows or columns
    is it that there is a limit? if there is, how can i increase?
    im trying to plot a graph using my data from excel which has over 10000 rows of data

    I use this VI to read excel and to write a graph report.
    in my excel, which i have attached, there's all data with about 11000 row.
    i want to use it to plot a graph and i kinda stuck at here where there is this limit of 4000 row? and i can't seem to get the header i have link in the block diagram to the graph either.
    Attachments:
    excel.xls ‏837 KB
    Read_excel_G_word_report.vi ‏34 KB

  • 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)

  • How, using Adobe Connect can increase the number of participants in the meeting? I need more than 25 people.

    Hi, I use licensed Adobe Connect. Earlier in the meeting could involve up to 100 people. Now only 25. How, using Adobe Connect can increase the number of participants in the meeting? I need more than 25 people.
    Thanks for your help.

    The purchasing option through adobe.com only allows up to 25 attendees. If you need more than that, you will need to purchase through a reseller. You can find one that is able to sell in your part of the world, here: Adobe Connect Partners. Just reach out to one of the Global Partners.

  • Can you get an Apple ID for corporate use to associate with more than 10 devices?

    Can you get an Apple ID for corporate use to associate with more than 10 devices?

    I don't believe you can. The usual model for iOS app distribution is for each device to have a unique Apple ID and for apps to be acquired separately, either via codes from the Volume Purchase Program or individual purchase through the iTunes Store. The licensing from the iTunes Store doesn't allow an app to be installed on more than one device unless all the devices are being used by a single person, so you legally cannot install one app on multiple corporate devices in the circumstances most businesses use.
    Regards.

Maybe you are looking for