Problem with Count

In Essbase, is it possible to perform a counting function ( one that is similar to the COUNT in Oracle ). For example, I want to:1. Get a count of all the interception with Forecast Measure = 1002. Given a group of interceptions, get a count of all the interception with Forecast Measure = 100If we can't do this in Essbase, we may have two other solutions:1. Perform the count by going through all the interceptions on a one-by-one basise, but it is going to be too too slow2. Have all the values of the Forecast Measure to be stored in Oracle as well. Whenever a value in the Forecast Measure change, the Oracle table automatically gets updated. In Oracle I can do COUNT in SQL. However, I don't know what is the most effective way of performing such kind of data synchronization between Essbase and Oracle.Anyone gets an idea?Thanks,Anne

To count the rows for the filtered data, you need to fo with actual table nly. May be, you need to look at the index on Column_name, however, that would not help you here as you are using % ''val'' %(not sargable). 
An index on the column would certainly help, assuming that the table has quite a few more columns than this column. Scanning the index is faster than scaning the index, since it's fewer pages to scan.
Full-text index that was suggested by someone else, can be a great improvement, but that requires that value searched for is a whole word, or at least start of one.
But overall Queriessqlserver need to explain the problem in more detail, and particular why (s)he is running this query, to get any meaningful suggestions.
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • Receiver determination - Xpath expression problem with count

    I am working with a scenario where I pick up records from a JDBC connection and if the number of records I pick up is less than a certain number I want to call a webservice.  If it is greater than the number I want to write out a file to be processed by a different process on the receiving end.  I have created the receiver determination condition with the following conditions:
    (/p1:MT_HOG_Data/row[count(row) > 3] EX)
    (/p1:MT_HOG_Data/row[count(row) <= 3] EX)
    The integration is always processing the second condition no matter how many records come in.  I have tried with and without the multiline option.  Can anyone help with this?
    I have searched through the forum and checked the following links without any resolution:
    http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/ab/13bf7191e73a4fb3560e767a2525fd/frameset.htm
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    I can't find any examples where a count of records is checked in the expression editor.  Thanks in advance for any help.

    You can not use the EX operator in that case, because that is used only for node existence checks, not for value checks.
    Do you have a row number in your structure ? Then you could write the xpath expression with that counter tag and value
    Example: you want to send to receiver A if count > 3, else to B:
    you set  /rowNumber EQUAL 4 for sender A
    and /rowNumber NOT EQUAL 4 for sender B
    The condition is applied to the whole document. If one of the node/values are true for that condition, then the whole condition is set to true.
    Problem with that is that the second condition also will be true because nodes for that condition will be found
    better would be to have a rowcount tag in the structure. If that is not possible, you can use the "Enhanced Receiver determination" where you can define a mapping which determines the receivers. There you can do anything complicated you want.
    CSY

  • Problems with counter in renaming interface not maintaining consistency across multiple libraries

    Happy New Year, all.
    We have a problem in Aperture that I was curious if others had, and I'm hoping somebody has figured out a workaround they will share with me. Originally, we used Aperture and it had one huge library for our different types of photography. We had to change away from that setup because if there was a problem it would take ages to troubleshoot a ~500GB library and perform actions like rebuilding the library. We didn't want to do this, but splitting into six libraries has improved the speed in general and has made rebuilding smaller individual libraries quicker.
    We shoot a lot of photos and want each photo to have a unique number (along with a custom name). We set up a rename option in Aperture that has "Custom Name_Counter" and set counter to be six digits. The problem this seemed to create is that the counter in the rename function doesn't produce a unique number consistently across libraries. If I'm in library A, and I rename a batch of files, the counter will go up and remember its last number as long as I stay in Library A. The minute I switch to Library B, the number is at where it was the last time I used Library B. This indicates to me that the preferences travel with the library.
    Does anybody know a way that I can have a global preferences file, rather than a library preferences file? It seems it maybe used to be this way, but one of the version 3 upgrades forced me to delete a preferences file for the Facebook bug a couple of version 3 subversions ago.
    On a different note, another problem with renaming is that it is so slow. Renaming master files for even 100 or so files takes minutes. Does anybody else have this happen? Sometimes it's faster, but I haven't been able to figure out a pattern to this.
    I've submitted feature requests for revamping the renaming interface for Aperture for at least a couple of years. It never seems to improve. iView Media Pro, a program I used six years ago, had a great renaming setup and I wish Aperture
    Maybe it's time to reinstall Aperture. I bought it on disc, so it's not through the App store. Does anybody have experience reinstalling? I would, of course, like to keep keywords and other preferences.

    hallerphoto wrote:
    Machine is a Mac Pro dual quad-core 2.16 GHz.
    I am unaware of a 2.16 GHz Mac Pro tower. Are you referring to a Macbook Pro or to an iMac? Or is it a configuration I am just unaware of?
    My concern is that it seems that you may be making major workflow compromises that might be better dealt with by hardware changes as feasible. E.g. most 2.16 GHz Mac CPUs are about 1/6 as strong as a top Mac Pro today or about 1/4 as strong as today's Macbook Pros, and that has huge implications on Aperture performance.
    Also, graphics processors of the 2.16 GHz era were ridiculously weak compared to modern Macs. Aperture has historically performed best with strong GPUs (e.g. the strongest G5 towers would not run Aperture without a GPU upgrade). If you stay with the existing box a GPU upgrade may (if feasible) be in order.
    You did not mention RAM, which has defining impact on Aperture performance.
    Even if no hardware upgrades are made, it is useful to know what hardware performance bottlenecks may exist. So some questions:
    • Which Mac(s), exactly?
    • Which OS version and which Aperture version?
    • How much RAM is on board?
    • If a Mac Pro, which GPU card is in use?
    • What mass storage (hard drives and SSDs), how connected and how full?
    Thanks.
    -Allen

  • Problems with counter

    Hello everybody.
    I have a problem with a counter used in counter-based maintenance.
    I'm sure that the characteristic was created correctly, so I think the problem is in the mesauring document.
    When I update the counter with a value like the previous(I do that so that scheduling dates will change), the counter resets itself, and at the next updated the the field "Total Counter Reading" is empty.
    Where is the error?
    Thanks advance.
    Viviana

    Hi,
    Though your query is not very clear, what I have understood is that you are creating a mes doc. for which the value already existing is X. You are creating a new meas doc.. with the same value X, your difference should be '0' and the total counter reading should remain as X only. Is it not happening in this way ?
    Regards,
    Bala.

  • Timing problem with counting edges

    Hello!
    I use a NI PCI-6221 DAQ card with NI-DAQmx to count edges of TTL pulses for a spectrometric application.
    It is extremely important that I count the pulses for a well-defined period of time. Typically, I want to count the edges that reach the counter in the period of 400 milliseconds.
    Normally, this works quite well, when I use a WHILE loop that reads and restarts the counter every 400 milliseconds. Things change when the PC I run the VI on has other programs running in the background. Expecially computing-time intensive programs delay the 400 milliseconds of the WHILE loop for up to several 100 percent, resulting in an wrong counter read.
    I tried to use a timed WHILE loop but this din't change anything, regardless of the timimg source (onboard clock or PCI-6221 counter) I applied.
    Has anyone encountered similar problems and found a solution? Isn't there a possibility to control the counting time by hardware?
    Thanks in advance!
    EresthorMessage Edited by Eresthor on 04-07-2005 08:17 AM

    Hej Lynn,
    of course your idea works, thank you. It works extremely well this way, too.
    My problem with this approach is that I need both counters on the PCI-6221 to count data from my spectrometer simultaneously on two channels. That's why I would like to trigger the counter in a different way, for example with a clock.
    Is there no way to trigger the counter with the timebase of a hardware clock on the card? Or ist there another possibility without wasting a counter?
    Eresthor

  • Should Device Test find problem with counter?

    Hello!
    I am have one problem with PCI 6251 board. It seems to me that something happening with counter 0. Several days ago everything was ok, but now any counter output does't appears on its terminal (on BNC 2120 block). When I see at the signal from it on the oscilloscope, I can see right shape of the pulses, but about 10 mV amplitude. Everyting is perfect with counter 1 output.
    OK, I run the self-test and it is passed. I have tried to reset the devce and try again - the same result. Self-test is passed, but counter 0 seems to be not functioning.
    Is it another possibility to check the device?
    Thanks in advance!

    Hi Baturin,
    It is quite possible that your BNC connector has problems. If you were able to route the output of Counter 0 to a PFI line, and able to see a good signal, then your terminal block is at fault. The first things you should look for are the pins. Sometimes, the pins on the connectors are bent, and thus do not provide a reliable contact. Second thing you should look for is any external damage. Finally, use the test panel in Measurement and Automation Explorer (MAX), in the counter tab to test the card (which is probably what you are already doing).
    If all of the above still seem to confirm your initial diagnostic of a bad BNC connector and a good M series card, then please call us. We would then do a final troubleshooting before sending your BNC connector back to be repaired.
    Thank you and best regards,
    Nathan
    Applications Engineer
    National Instruments

  • Problems with counting the forum points?

    Hello sdn team,
    i recogized that i got some points in forum threads but they are not added to the summary points on the business card. Here is a sample:
    Difference between EAM and MAM
    Are there any problems with the pointing system?
    Regards
    Frank

    i had similar kind of issues more than once and reported the same to [email protected] which was quickly fixed.
    mail [email protected] along with the link to the thread and your account id.
    Regards
    Raja

  • Problem with Counter in Query

    Hi Experts,
    There is a problem in my query output.
    I have a CKF for sales documents number created with replacement path which gives the correct count of number of Sales documents.
    But the req here is to create two more counters which will be counting the passed and failed count with reference to other KF1 (the value of this KF can be 0 or 1).
    i.e. If the KF1 value is then failed count would be 1 .
           else passed count would be 1.
    I have used the Replcement path variable created for Sales Document count.
    For failed count the CKF formula which I have created is: (Sales Order Count ) * (KF1<>1)
    Which gives the right result but as soon as I remove the drill down , instead of aggrading the total results, failed counter still shows 1 which is incorrect.
    Could any one please help me out.
    Regards,
    BW User

    hello,
    try using exception aggregation as total and reference char as the one which u have reomved from drilldown.
    Regds,
    Shashank

  • 6014 board problems with counter 0

    Hi all,
    I'm working on a project with a 6014 board and Real-Time Windows Target of Matlab. I need to interface the signals from two incremental encoders. The qudrature signals are converted into a direction signal and a pulse train signal with the idea to feed them to the counters of the board, configured as bidirectional counters in up/down mode. The connections are as follows:
    For Counter 0 - the pulse train signal is fed to PFI8, and the direction signal to DIO6.
    For Counter 1 - pulse train signal to PFI3, direction signal to DIO7.
    The problem is that Counter 1 is working properly, while with the same signals fed to Counter 0 what I read makes no sense. The counter increments by very large values at once and behaves erraticaly.
    I'm seeing this behavior on two different boards.
    Any help please!
    Thanks in advance!
    Stanislav

    Hi Stanislav,
    My recommendation will be to install Signal express (it is a free application that you can use to generate or aquire data) avaialble at the following location https://lumen.ni.com/nicif/us/evalsignalexpress/content.xhtml
    and DAQmx driver available at the following location http://joule.ni.com/nidu/cds/view/p/id/3423/lang/ro
    After you install the two software mentioned above, launch Signal Express and it should be straight forward how to program because it is a configuration based programming. You can use the menu to generate a train of pulses on counter 1, also you may use an oscilloscope to validate the generation part and than use your software to acquire on CTR0. If you still have the problem to acquire on CTR0, you can reverse it and use Signal Express in the acquisitioin part.
    Best regards,
    I.R.

  • Problem with counting number of clic with initialize mouse vi

    Hi,
    I want the vi stops when the user clics several times with the mouse. I use initialize mouse vi instead of event structure for other reasons (I can't use it).
    I intented to count the number of clics and when this number of clics occur, the vi stop. But the vi don't work, it stops at the first clic although when i highlight execution it seems to work as I want.
    I send here the vi.
    If someone could help me, thanks in advance.  
    Attachments:
    number of clic.zip ‏24 KB

    Hi,
    The problem is the execution time, if you push the mouse button your program will execute number of times before you lose the button agian. Even if you push it realy fast.
    I made some changes to your code there i wait until button is released befor continuing.
    Regards
    /Thomas
    Attachments:
    number of clic Folder.zip ‏20 KB

  • Problem with count query

    I am connecting to the excel and running the following query:
    Select Count(*) from [RIF$];
    I is working fine and giving me total count of rows
    Now when i try the following version of count
    Select Count(Distinct Status) from [RIF$];
    where Status is a column name.
    It is giving the following error:
    java.sql.SQLException: [Microsoft][ODBC Excel Driver] Syntax error (missing operator) in query expression 'Count(Distinct Status)'.
    Pls help me
    its as always urgent

    This shouldn't execute in the quiery analyzer too, you don't have a java problem. I am not sure this is the optimal but you can try something like:
    select count(c_id) from (select distinct pcid c_id from contragent) cntr HTH
    Mike

  • Group by problem with count

    I am trying to figure out the number of charters taken by each customer. I can get it to work fine if I just count the trip id and group by the last name. The problem is that I want to display my customer's full names and keep getting errors when I try to group by the concatenated field Any suggestions? Here is the code I am using:
    Select count(charter.char_trip)"Total Charters",
    CUS_FNAME||' '||CUS_LNAME "Customer"
    From CHARTER, CUSTOMER
    WHERE CUSTOMER.CUS_CODE = CHARTER.CUS_CODE
    Group by "Customer"
    ;

    try using a subquery.
      select cc.customer "Customer",
             count(cc.char_trip) "Total Charters"
        from (select charter.char_trip,
                     CUS_FNAME||' '||CUS_LNAME
                From CHARTER, CUSTOMER
               where CUSTOMER.CUS_CODE = CHARTER.CUS_CODE) cc
      group by cc.customernote: untested

  • Adding a guest book to an iweb created site and problems with counter

    Hi, can anyone tell me if it's possible to add a guest book to a website created on iweb? I can find the html to insert, but can't find out how to insert it on the page.
    Also, I have tried adding the counter to see how many visitors I have, but it does not show up when the site is published.
    Thanks very much, in advance.

    You might have better luck asking in the iWeb forums here:
    http://discussions.apple.com/category.jspa?categoryID=188

  • IR Problem with COUNT (*) OVER () AS apxws_row_cnt

    Hi all,
    i have a query wich is ran under 2 seconds when ecexuted in SQL (TOAD),
    when i use this query in an interactive report then it takes minutes.
    When i reviewd the query which APEX is sending to the DB i noticed an additional select clause:
    SELECT columns,
    COUNT ( * ) OVER () AS apxws_row_cnt
    FROM (
    SELECT *
    FROM ( query
    ) r
    ) r
    WHERE ROWNUM <= TO_NUMBER (:APXWS_MAX_ROW_CNT)
    when i remove the COUNT ( * ) OVER () AS apxws_row_cnt then the query is fast again.
    How can i change the IR so that the COUNT ( * ) OVER () AS apxws_row_cnt doesn't appear annymore.
    I removed the pagination (- no pagination selected -)
    I put the query in a new IR report in a new page, the COUNT ( * ) OVER () AS apxws_row_cnt still appears.
    Any suggestions i can try ?
    Regards,
    Marco

    Marco1975 wrote:
    Hi all,
    i have a query wich is ran under 2 seconds when ecexuted in SQL (TOAD), I doubt that.
    I think your query returns many rows. Did you see all the rows in Toad in 2 secs?
    If the answer is NO then the query is not finished after 2 secs. It just showed you the first few rows.
    Almost every tool including apex does the same.
    However if you want to know how many rows are returned then there is no way around doing the whole select until the last row.
    Then the result can be shown.
    APEX or a developer might use something like the analytic function "count(*) over ()" to get this result already on the first row. The database still needs to fetch all the rows. Howeverthe result set is not transported over the network to the client, which might also save a lot of time compared to not doing it on the database level.

  • Apple, please help. Problems with counter on .Mac front page.

    This problem has been there for quite some time already. Kindly look into this.
    Thanks.
    http://discussions.apple.com/thread.jspa?threadID=1081633
    http://discussions.apple.com/thread.jspa?threadID=1081518
    http://discussions.apple.com/thread.jspa?threadID=992846

    Apple won't help via these forums; instead send your feedback to .Mac support via the form at the bottom of this link...
    http://www.apple.com/support/dotmac/publishing/

Maybe you are looking for

  • File upload in server through vpn

    hi tapash, i am connecting the db in us from my machine in india through vpn. actually my requirement is to upload the file into the middle tier after deploying into it. but the page in my machine when i try to run in jdeveloper is very very slow say

  • Small hyperlink bug in 10.1.3 (preview)?

    When creating a JSP, and selecting some text to convert to a hyperlink, pressing the hyperlink button will show a dialog to enter the hyperlink's details, but the generated code will be inserted AFTER the selected text. The generated hyperlink is 0 (

  • CC desktop download error even after reinstalling

    CC desktop gives error right after sarting. Removed several files and restarted, redownloaded CC etc. just as suggested on the adobe help site. Nothing works. Stragely enough, it worked well on my Desktop Mac pro, but the problem persists on my lapto

  • How can i remove the border of TextField

    Hi,first i set the border of textfield in my program now i want to remove this border and want to set the default border.how can i do that. thanks

  • Parked Document workflow

    Hi All, Im working in FI workflows. My Business object is FIPP. But clients wants to use custom class's instead of FIPP Business object. Now im having doubt in triggering part of the work flow. If I use class, then Is i need to make a entry in SWEC a