Using the vs do-it-all formula in a sql

As a beginner, I worked on some reports, and very often I need to decide whether to put the code in CF (formulas) vs in the main query.

Using CF, the code is cleaner since the function is dedicated to a task, as do all the tasks in a single big sql will make it harder to read and maintain on the road.

However, I am concerned about the degradation of performance regarding CF.
First he CF is PL/SQL and SQL and PL/SQL execution at the same time involves the change of context.
In addition, according to my colleagues, SEE run in report server, while SQL runs in the DB server. The IO involved between the two servers is also another penalty (or is it a kind of load balancing, which reduces the workload on the DB server)?

Right now I'm trying to add CF as little as possible, as it is difficult to tighten requirements in the main SQL. I have made the right choice?

Thank you very much.

Hello

You do think it rigth...

http://download-UK.Oracle.com/docs/CD/B14099_17/bi.1012/b14048/pbr_tune.htm

20.4.3 calculations
In a report (either by summary columns or formulas), to ensure that most of the calculations is performed by the data source. In the case of SQL queries, the calculations are performed on the database rather than the data retrieved by the report. User-defined functions and stored procedures in the database can also be included in the select list of the query to a database Oracle or a JDBC query. It is more efficient to use a local function, since the calculated data is returned as part of the database of results.

Concerning

Tags: Oracle Development

Similar Questions

  • FireFox opens a lot of tabs on its own. I can't do something, but to close it using the windows Task Manager. all this occur after installing the add-on flashgot. (I've used this module before and it was working OK)

    I use Firefox for two years now and use the flashgot. and I really like it.
    This laptop has firefox on it since the first day. and I got flashgot on this as well. But today when I tried to download something that I have that option (save the file) flashgot wasn't there. I was a little surprised but downloaded and installed flashgot anyway. He asked me to restart firefox and I let him. then when it restarted I had a lot of pop windows asking me which application is used to open this link (it wasn't a link and I got only firefox so I picked it up) was windows 10 or more pop so I chose to use this option for all. When I did so all of a sudden got a lot of poping up tabs, then a new window pop Firefox on with a lot of poping up tabs and then a new window. i've got up to 19 poping windows with lots of tabs. I had to close it with the Task Manager.

    now when I want to use firefox about 20 tablets pop up then a new window Firefox pop up, and then when I type a url another 20 tablets pop then a window pop...

    This laptop may have problems. am scaning now using an ESET online scanner to see what is happening.
    Thank you for your help in advance

    Create a new profile as a test to see if your profile is the source of the problems.

    See basic troubleshooting: a new profile

    There may be extensions and plugins installed by default in a new profile, so check that in "tools > Modules > Extensions & Plugins»

    If this new profile works then you can transfer files from the old profile to the new profile (be careful not to copy corrupted files)

    See http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Creating subnets - can I use the zero (first) and all-ones (last) subnet?

    Hello!

    According to RFC 950 (link), I can't use the zero and the all-in-one subnet to subnet.

    It is still in force, or I can now use the first (zero) and the last subnet (all-ones)?

    Thank you!

    The default behavior of the routers and Cisco switches is to reuse the zero and all subnets and has been like this for a long time. You can now use all subnets.

    HTH

    Rick

  • Using the scan function on all-in-one printer with wireless print server

    I have an Epson CX7800 and that you have installed the Linksys Wiress G print server.  I was not able to access the scanner since the connection to the print server.    Just printer function works well from what ever printer I choose to print from, cannot use the scanner option.  Any help would be appreciated.

    Figured it out.  Didn't know you had to click on connect before analysis.

  • How to use the Pivot function for range group in oracle SQL

    Hello

    Hello!!!

    I need to display the data in the format below. There are 2 columns 1 is State and another is rate.

    State < 100 100-199, 200-299 300-399 400-499, 500-599 600-699 700-799 800-899 900-999 > = 1000 Total
    AK 1 2 0 4 1 4 4 35 35 4 1 25
    AL 0 0 2 27 10 17 35 2 2 35 0 103
    AR 0 0 1 0 0 2 2 13 13 2 0 6
    AZ 0 1 2 14 2 14 13 3 3 13 0 57
    CA     0     0     1     6     2     7     3     4     4     3     0     34

    Developed the sub query but unable to use the beach on the pivot function. Please help on this.

    (select (SELECT short_description
    OF CODE_VALUES
    WHERE CODE_TYPE_CODE = ad. STATE_TYPE_IND_CODE
    AND VALUE = ad. STATE_CODE
    ) STATE,
    Nr.rate
    N-NEUTRAL
    c contacts,
    announcement of addresses,
    xref_contacts_addresses xca,
    neutral_rates nr
    where n.contact_id = c.contact_id
    and n.address_id = ad.address_id
    and xca.address_id = ad.address_id
    and xca.contact_id = c.contact_id
    and nr.contact_id = n.contact_id
    and nr.rate_frequency = 'HOUR')

    Like this

    with t
    as
    (
    select 'AL' state, 12 value from dual union all
    select 'AL' state, 67 value from dual union all
    select 'AL' state, 23 value from dual union all
    select 'AL' state, 12 value from dual union all
    select 'AL' state, 12 value from dual union all
    select 'AL' state, 78 value from dual union all
    select 'AL' state, 34 value from dual union all
    select 'AL' state, 4 value from dual union all
    select 'AL' state, 12 value from dual union all
    select 'AL' state, 15 value from dual union all
    select 'AZ' state, 6 value from dual union all
    select 'AZ' state, 123 value from dual union all
    select 'AZ' state, 123 value from dual union all
    select 'MA' state, 23 value from dual union all
    select 'MA' state, 120 value from dual union all
    select 'MA' state, 456 value from dual union all
    select 'MA' state, 11 value from dual union all
    select 'MA' state, 24 value from dual union all
    select 'MA' state, 34 value from dual union all
    select 'MA' state, 87 value from dual union all
    select 'MA' state, 23 value from dual union all
    select 'MA' state, 234 value from dual union all
    select 'MA' state, 789 value from dual union all
    select 'MH' state, 54321 value from dual
    )
    -- End of test data
    select state,
           nvl(count(decode(value, 0, 0)), 0) "<100",
           nvl(count(decode(value, 1, 1)), 0) "100-199",
           nvl(count(decode(value, 2, 2)), 0) "200-299",
           nvl(count(decode(value, 3, 3)), 0) "300-399",
           nvl(count(decode(value, 4, 4)), 0) "400-499",
           nvl(count(decode(value, 5, 5)), 0) "500-599",
           nvl(count(decode(value, 6, 6)), 0) "600-699",
           nvl(count(decode(value, 7, 7)), 0) "700-799",
           nvl(count(decode(value, 8, 8)), 0) "800-899",
           nvl(count(decode(value, 9, 9)), 0) "900-999",
           nvl(count(decode(value, 10, 10)), 0) ">=1000"
      from (
              select state, case when value < 100 then 0
                                 when value between 100 and 199 then 1
                                 when value between 200 and 299 then 2
                                 when value between 300 and 399 then 3
                                 when value between 400 and 499 then 4
                                 when value between 500 and 599 then 5
                                 when value between 600 and 699 then 6
                                 when value between 700 and 799 then 7
                                 when value between 800 and 899 then 8
                                 when value between 900 and 999 then 9
                                 when value >= 1000 then 10
                            end value
                from t
           )
     group
        by state
    
  • Use the results of ore RQTableEval in a PL/SQL module

    Documentation of ore RQTableEval show how to display the results in the form of a query using the syntax "SELECT * FROM TABLE (RQTableEval ( blah, blah ". "))"    I use the option 'select' for the third parameter of RQTableEval.

    But how can I access this result within a PL/SQL module?  This syntax raises a compile error of

    • Error (76,32): PL/SQL: ORA-22905: cannot access the rows of a table not nested element

    Open the speed for select * from table (rqTableEval ( blah, blah ))

    where speed is a weakly typed SYS_REFCURSOR

    I'm out of ideas/knowledge to solve this problem.

    You might want to try display in space R Oracle here: R Technologies

    John

  • Tecra 9100: I want to use the same settings in all user profiles

    I use it on a Tecra 9100 (if it matters).

    Is it possible to export my settings (best for all profiles at a time), to copy it to another windows user? and any other laptop Tecra 9100? I work with two user accounts on my laptop (one for businesses, a private), I did all the settings as I want, but in the other user account, it comes with factory settings, so I guess that these settings are stored for each user separately.

    And if it's possible, I want to copy the settings for laptop computer to my colleague too.

    Hello

    I have gift? t know exactly what settings you use, but as far as I know just administrator have full control over the tools pre-installed and utilities. As an administrator, you can give an administrative access level.

    On the copy on another machine I can't tell you much, but I guess it must be configured individual.

  • Zbook Studio G3 HP: How to disable the integrated graphics card Intel and use the dedicated Nvidea graphics all the time?

    Dear all,

    I have a HP zbook studio G3 laptop. I want to go to the Nvidia graphics card permanently.  I tried to disable graphics integrated in the Device Manager, uninstall the driver and allowing even the nvidea card chart of all profiles in the parameter 3D tap in the Nvidia configuration software. Non of them seems to work as the integrated graph is always in action and simple games could not be executed. I always keep in the option to high-performance mode, and the laptop is still connected. Should I manipulate the bios setup?

    Thanks in advance,

    Bezzi

    I have the version non-studio of Zbook 15 G3 which has removable video card. I added the video card after purchase and found that it worked just right if I went into the BIOS and set it to use only the nVidia card. However, because yours is graphic switchable I don't know that you have this option. Have you looked at even the BIOS? Press ESC you turn on, then F10

  • Using the Menu accordion - expand all Option

    Hello

    I was wondering if there was any possible way to extend to all the options of the menu accordion. I understand there is a 'Collapse All' option, but it would be really useful if there was a way to develop all the options in the menu accordion. If there is no way to do this directly, are there other options, either by creating a button or a link that would lead any of the accordion to develop options. Help, please! Thank you.

    Please do not hesitate to add your suggestion in our ideas section.

    Thank you

    Sanjit

  • How can I get my favorites back sidebar its more quickly than using the button and opening all extensions

    My favorite sidebar has disappeared and I can't find a way if this reverts. How do I restore it?

    On a Mac, it is not [Ctrl + B], try out different options, I found that it is however [command + B] to open the Bookmarks Sidebar which allows use and rename bookmarks.

    Hope that helps someone!

  • Using the search button in all applications crashes Homescreen App

    I'll just my Razr Maxx Droid two days ago, and after installing some apps, I tried searching in the applications screen. An error message pops up saying the app Homescreen (process com. Motorola.Home) has stopped unexpectedly. Please try again. and then the home screen restarts and everything works except in all applications. Any suggestions?

    Try to uninstall the last update for Google Search...

  • How to make a portable USB drive use the same drive letter all the time

    Original title:

    I have many removable hard drives from Toshiba.  Use them for photography.  I usually connect simply, transfer photos from the DSLR camera (images raw, very big, not a camera point/rod).  When I plug in, computer automatically selects a player... F, g, H: by M or N.

    Then, I use Adobe Lightroom for adjustments.  Once they are imported into Lightroom it keeps track of this record, they were on.

    PROBLEM:

    If I unplug the removable hard drive, plug in at a later date, computer can randomly choose a different example M instead of H letter.
    LightRoom is so impossible to find photos/images.  I would then have to re - import and start any setting completely from the beginning.

    Question:
    How to direct the computer to select the same drive when I plug in a removable hard drive.

    Plug in a hard drive removable, computer selects H:, can I import into LightRoom, I disconnect the removable hard drive, a week later I want to make adjustments more photography, connect the removable hard drive and FORCE/DIRECT COMPUTER TO SELECT H: AGAIN (or whatever of the original letter was).

    Hope it makes sense.

    Jim

    Hello

    There is a way to assign a static drive on an external USB drive letter, so you always get the same drive letter for the drive.

    Click on the following link and follow the steps to change a drive letter.

    Change, add, or remove a drive letter

    http://Windows.Microsoft.com/en-us/Windows-Vista/change-add-or-remove-a-drive-letter

    I hope this helps.

  • Cannot print using the printer HP C6380 All In One

    Have a new HP computer withWindows8. Have a HP C6380 All In One printer. When I send a job to the printer it is hindered in the queue and do not print.  When I got the computer I downloaded the drivers to make the Windows 8 compatible printer. Any suggestions?
    OT: Printing printer print

    Try to go to: http://www8.hp.com/us/en/support-drivers.html . Enter the full name of your printer and download and install the necessary drivers/software for windows 8. Hope this helps and if you need any additional aid station and we will be happy to help you.

    The above opinion is mine and mine nothing and does not necessarily reflect that of Microsoft, it's employees, or any other Member of this forum.

    "When we try to take anything by itself, we find it hitched to everything else in the universe."-John Muir

  • Use the adjustment options on all objects of a locked layer

    This will be easy for some of you.  But I'm just a kid in it.

    I have a locked layer called AD.

    Not all ads get their boxes.  So, I'd love to run a script that would be looked at the locked by the layer name layer and make all the content of image proportionally fill.

    I tried to restore the other code I found here, but I failed miserably.  I appeal to the gods!

    Hello

    Try this:

    myDoc = app.activeDocument;

    myLayer = myDoc.layers.item ("AD");

    myLayer.locked = false;

    for (k = 0; k

    If (myDoc.allPageItems [k] .itemLayer is myLayer)

    {

    currPItem = myDoc.allPageItems [k];

    currPItem.fit (FitOptions.PROPORTIONALLY); or another option you choose

    }

    myLayer.locked = true;

    Enjoy

  • How to use the record type as a parameter IN PL/SQL procedure or package

    Hi people,

    I need help on the record as the OUT parameter type. I am able to get out a single line as a parameter, but not getting do not idea how to get a multi ranks as output parameter.

    I have the code that works very well for a single line. Please see CODE1.

    But when I try to get several lines, I'm failing to do. Please see the CODE2. I get the error of compilation as


    Error report:

    ORA-06550: line 11, column 35:

    PLS-00487: Invalid reference to the variable "P_NAME.

    ORA-06550: line 11, column 1:

    PL/SQL: Statement ignored

    06550 00000 - "line %s, column % s:\n%s".

    * Cause: Usually a PL/SQL compilation error.

    Any help or a sample execution of script would be really useful.

    Thanks in advance.

    YZ

    --------------------------CODE1------------------------------------------

    -------------------------Package Spec-------------------------------

    CREATE OR REPLACE

    PACKAGE xx_sample_pkg as

    --

    Xx_sample_table_rectype RECORD TYPE IS

    (p_name varchar2 (40))

    number of p_emp_id

    );

    PROCEDURE xx_sample_prc (xx_sample_rec1, OUT xx_sample_table_rectype);

    END xx_sample_pkg;

    ------------------------------Package Body------------------------

    create or replace

    PACKAGE xx_sample_pkg AS BODY

    --

    PROCEDURE xx_sample_prc (xx_sample_rec1 OUT xx_sample_table_rectype) IS

    BEGIN

    SELECT ename, empno

    IN xx_sample_rec1

    FROM scott.emp

    WHERE ename = 'SMITH ';.

    END xx_sample_prc;

    END xx_sample_pkg;

    -------------------------------------------Execute----------------------

    DECLARE

    l_rec_type xx_sample_pkg.xx_sample_table_rectype;

    BEGIN

    dbms_output.put_line ('xx_sample_prc appeal');

    xx_sample_pkg.xx_sample_prc (l_rec_type);

    dbms_output.put_line ('YZ' | l_rec_type.p_name |') '|| l_rec_type.p_emp_id);

    END;

    ---------------------------------------------------------------

    -------------------------CODE2-------------------------------------------

    -------------------------Package Spec-------------------------------

    CREATE OR REPLACE

    PACKAGE xx_sample_pkg as

    --

    Xx_sample_table_rectype RECORD TYPE IS

    (p_name varchar2 (40))

    number of p_emp_id

    );

    PROCEDURE xx_sample_prc (xx_sample_rec1, OUT xx_sample_table_rectype);

    END xx_sample_pkg;

    ------------------------------Package Body------------------------

    create or replace

    PACKAGE xx_sample_pkg AS BODY

    --

    PROCEDURE xx_sample_prc (xx_sample_rec1 OUT xx_sample_table_rectype) IS

    BEGIN

    SELECT ename, empno

    IN xx_sample_rec1

    FROM scott.emp;

    END xx_sample_prc;

    END xx_sample_pkg;

    -------------------------------------------Execute----------------------

    DECLARE

    l_rec_type xx_sample_pkg.xx_sample_table_rectype;

    BEGIN

    dbms_output.put_line ('xx_sample_prc appeal');

    xx_sample_pkg.xx_sample_prc (l_rec_type);

    for l_rec in 1.l_rec_type.p_name.count

    loop

    dbms_output.put_line ('YZ' | l_rec_type.p_name (l_rec) |) » '|| l_rec_type.p_emp_id (l_rec));

    end loop;

    end;

    ---------------------------------------------------------------

    bb8c573a-6ca3-4d7c-90ed-e55c2df67201 wrote:

    But now, my question would be why the record type could not be used? My understanding is missing some concept between use of type type array collection record vs. Please specify.

    Do not confuse the folder with the collection.

    SY.

Maybe you are looking for