Looping is very slow on large data set

Hi All,
I need suggestion in optimizing the below looping scenario .
Sample data in the table , For easy understanding I kept only 4 columns actual source has  56 columns
Input :
#Final
RwNum
JobSource
RuleName
PackageType
1
Presubmission
GameRating
Xap
2
PostSubmission
GameRating
Xap
3
Presubmission
GameRating
NULL
4
Presubmission
TCRRule
Xap
5
PostSubmission
NULL
Xap
6
Submission
NULL
Xap
I need to iterate row by row in the above table  to compare the data with the rest of the table . i.e.  First get the data for RwNum =1 and compare with all the other rows in the table (i.e. Rwnum  2,3,4,5,6 )  to merge that data in below
output format  and repeat the same process for all the rest of rows.
Expected  Output :
#Final
RwNum
JobSource
RuleName
PackageType
1
Presubmission
GameRating
Xap
2
PostSubmission
GameRating
Xap
4
Presubmission
TCRRule
Xap
6
Submission
NULL
Xap
In the final output , RwNum 1 is the merged result of  RwNum 1 & 3  . Similarly  RwNum 2 in the output is the merged result of  2 & 5   and other records remain As Is.
So the query I wrote is below  :
While (@TopRwNum <=6
Begin
While (@InnerRwNum <= 6)
Begin
SELECT
---- Columns list
FROM          #final Fr
JOIN #final Ne
ON 
              Fr.RwNum
=@TopRwNum AND Ne.RwNum
=@InnerRwNum
AND @TopRwNum <> @InnerRwNum     
Where
--- Conditional logic to compare  and merge the data 
The above query executed in 10 secs
The above query is working when the count of rows is small , but if the #final has  ~1000 rows then the no of times the above code
has to iterate is 1000 *1000  ~= 1000000 times ( as there are outer and inner loops need to run for 1000 times each ) . Then the above
while loop logic is taking around 20 mins
Can we optimize the above code to make  iteration faster ?  . Any ideas would be greatly appreciated .

Hi All ,
Thanks for your replies .Sorry if haven't followed the forum rules , please forgive me . I kept only images as they help to understand the scenario
better . Now here i am posting the DDL scripts and also the expected output with some more columns.( I have used table variables here)
DECLARE  @Tab TABLE (
RwNum  INT,
JobParentID UNIQUEIDENTIFIER,JobSource      NVARCHAR(MAX),
PackageType NVARCHAR(MAX),
UpdateType  NVARCHAR(MAX),
IsAutoPassed NVARCHAR(256),
IsCanceled NVARCHAR(256),
IsSkipped NVARCHAR(256),
Result NVARCHAR(256),    
Fired NVARCHAR(256),     
RuleName NVARCHAR(256)
INSERT INTO @Tab
SELECT 1,'7ca42851-c3d2-42da-b5b9-d40392ae24fb','PreSubmissionSource','Xap',         'FullUpdate','','','FALSE','Pass','FALSE','RuleValidationResult^XboxLive'
UNION
SELECT 2,'7ca42851-c3d2-42da-b5b9-d40392ae24fb','PostSubmission','Xap',         'PartialUpdate','FALSE','','TRUE','Failed','FALSE','RuleValidationResult^GameCategoryNameChange'
UNION
SELECT 3,'7ca42851-c3d2-42da-b5b9-d40392ae24fb','PreSubmissionSource','Xap',         '','TRUE','TRUE','','Pass','FALSE','RuleValidationResult^XboxLive'
UNION
SELECT 4,'7ca42851-c3d2-42da-b5b9-d40392ae24fb','PreSubmissionSource','Xap',         '','TRUE','TRUE','','Pass','FALSE','RuleValidationResult^CumulativeDownload'
UNION
SELECT 5,'7ca42851-c3d2-42da-b5b9-d40392ae24fb','PostSubmission','Xap',         'PartialUpdate','FALSE','','TRUE','Failed','FALSE','PreinstalledPackage'
UNION
SELECT 6,'7ca42851-c3d2-42da-b5b9-d40392ae24fb','PreSubmissionSource','Xap',         'PartialUpdate','TRUE','TRUE','','Pass','FALSE','RuleValidationResult^CumulativeDownload'
UNION
SELECT 7,'7ca42851-c3d2-42da-b5b9-d40392ae24fb','PreSubmissionSource','Xap',         'FullUpdate','','','','Pass','','RuleValidationResult^XboxLive'
UNION
SELECT 1,'2004235d-af05-4e29-ab8d-50b80a088dd4','PreSubmissionSource','Xap',         'FullUpdate','TRUE','TRUE','','Pass','FALSE','RuleValidationResult^CumulativeDownload'
UNION
SELECT 2,'2004235d-af05-4e29-ab8d-50b80a088dd4','PreSubmissionSource','Xap',         'FullUpdate','TRUE','','FALSE','','FALSE','RuleValidationResult^CumulativeDownload'
SELECT * FROM @Tab  ORDER BY 2 DESC ,1  ASC
Original source table doesn't RwNum column . In order for me to iterate row by row on the above table i have created "RwNum" column . This column
has unique ID for every row of a JobIDParent. RwNum column is generated as below 
ROW_NUMBER() OVER( ORDER BY JobIDParent) AS  RwNum,
The output should be below  :
DECLARE  @Output TABLE (
RwNum  INT,
JobParentID UNIQUEIDENTIFIER,JobSource      NVARCHAR(MAX),
PackageType NVARCHAR(MAX),
UpdateType  NVARCHAR(MAX),
IsAutoPassed NVARCHAR(256),
IsCanceled NVARCHAR(256),
IsSkipped NVARCHAR(256),
Result NVARCHAR(256),    
Fired NVARCHAR(256),     
RuleName NVARCHAR(256)
INSERT INTO @Output
SELECT 1,'7ca42851-c3d2-42da-b5b9-d40392ae24fb',    'PreSubmissionSource',    'Xap',         'FullUpdate','TRUE','TRUE','FALSE','Pass','FALSE','RuleValidationResult^XboxLive'
UNION
SELECT 2,'7ca42851-c3d2-42da-b5b9-d40392ae24fb',    'PostSubmission', 'Xap',         'PartialUpdate','FALSE','','TRUE','Failed','FALSE','RuleValidationResult^GameCategoryNameChange'
UNION
SELECT 5,'7ca42851-c3d2-42da-b5b9-d40392ae24fb',    'PostSubmission', 'Xap',         'PartialUpdate','FALSE','','TRUE','Failed','FALSE','PreinstalledPackage'
UNION
SELECT 4,'7ca42851-c3d2-42da-b5b9-d40392ae24fb',    'PreSubmissionSource',    'Xap',         'PartialUpdate','TRUE','TRUE','','Pass','FALSE','RuleValidationResult^CumulativeDownload'
UNION
SELECT 1,'2004235d-af05-4e29-ab8d-50b80a088dd4',    'PreSubmissionSource',    'Xap',         'FullUpdate','TRUE','TRUE','FALSE','Pass','FALSE','RuleValidationResult^CumulativeDownload'
SELECT * FROM @Output  ORDER BY 2 DESC ,1  ASC
Merge rules to generate the above Output :
All the below rules should
be satisfied to merge two rows 
1) We only need to merge the data that is related to the same JobIDParent
2) Data in column for any two merging rows should not conflict .
I.e. Data in a column of a merging row should not be different to the data in the same column for the other merging row(only if both rows are having not NULL value in
that column )
3) we can merge two rows ,only if the data in all the columns satisfy any of the below cases 
case i) If
the data in the column of a row is having null/EmptySpace & the data in the same column for the other row is a valid value i.e. non empty or not null
case ii) Data
in a column of a row is equal to the data in the same column of the other row .
Output analysis by applying above rules:
In the @Output  analysis for JobIDParent '7CA42851-C3D2-42DA-B5B9-D40392AE24FB'
i)RwNum =1 is formed as a result of merge using the above rules from RwNum 3 & RwNum 7 .First the RowNum 1
and 3 are merged and the output  of these two rows are merged with RwNum 7
ii) RwNum =2 is not merged with any of the rows in fact table , as the no row in the table satisfy all the merge
rules with RwNum =2
iii) RwNum = 4 is formed as a result of merge using the above rules from RwNum 6 .
iv) RwNum =5 is not merged with any of the rows in fact table , as the no row in the table satisfy all the
merge rules with RwNum =5
In the @Output  analysis for JobIDParent '7CA42851-C3D2-42DA-B5B9-D40392AE24FB'
i)RwNum =1 is formed as a result of merge using the above rules from RwNum 2.
In this way we want the rows to be merged on the table
Sorry if my earlier post is not understandable .
Thanks in advance.

Similar Messages

  • Report download is slow for large data sets

    APEX 4.1
    I have a classic report which retrieves around 1lakh plus rows.
    While downloading report as excel it takes 5-10 mins for download.
    Any solution for this?
    Can we download in sets like first 1000 records n then next 1000 etc.?

    what I understood is we can export CSV in background using Kubicek's export_to_excel package.
    1.We can provide a button to execute procedure. - jfosteroracle says custom CSV download was slow
    2.Use job to download excel in background. - need to check with client if they wish to go ahead with this.
    Correct. You need to use the custom package and button on the page to submit the request for downloading the report in back-end.
    Is it possible to zip a file first and then download it?
    No. As of my knowledge it's not possible to zip a file and then download it.
    Thanks
    Lakshmi

  • Working with Large data sets Waveforms

    When collection data at a high rate ( 30K ) and for a long period (120 seconds) I'm unable rearrange the data due to memory errors, is there a more efficient method?
    Attachments:
    Convert2Dto1D.vi ‏36 KB

    Some suggestions:
    Preallocate your final data before you start your calculations.  The build array you have in your loop will tend to fragment memory, giving you issues.
    Use the In Place Element to get data to/from your waveforms.  You can use it to get single waveforms from your 2D array and Y data from a waveform.
    Do not use the Transpose and autoindex.  It is adding a copy of data.
    Use the Array palette functions (e.g. Reshape Array) to change sizes of current data in place (if possible).
    You may want to read Managing Large Data Sets in LabVIEW.
    Your initial post is missing some information.  How many channels are you acquiring and what is the bit depth of each channel?  30kHz is a relatively slow acquisition rate for a single channel (NI sells instruments which acquire at 2GHz).  120s of data from said single channel is modestly large, but not huge.  If you have 100 channels, things change.  If you are acquiring them at 32-bit resolution, things change (although not as much).  Please post these parameters and we can help more.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • 64-bit LabVIEW - still major problems with large data sets

    Hi Folks -
    I have LabVIEW 2009 64-bit version running on a Win7 64-bit OS with Intel Xeon dual quad core processor, 16 gbyte RAM.  With the release of this 64-bit version of LabVIEW, I expected to easily be able to handle x-ray computed tomography data sets in the 2 and 3-gbyte range in RAM since we now have access to all of the available RAM.  But I am having major problems - sluggish (and stoppage) operation of the program, inability to perform certain operations, etc.
    Here is how I store the 3-D data that consists of a series of images. I store each of my 2d images in a cluster, and then have the entire image series as an array of these clusters.  I then store this entire array of clusters in a queue which I regularly access using 'Preview Queue' and then operate on the image set, subsets of the images, or single images.
    Then enqueue:
    I remember talking to LabVIEW R&D years ago that this was a good way to do things because it allowed non-contiguous access to memory (versus contigous access that would be required if I stored my image series as 3-D array without the clusters) (R&D - this is what I remember, please correct if wrong).
    Because I am experiencing tremendous slowness in the program after these large data sets are loaded, and I think disk access as well to obtain memory beyond 16 gbytes, I am wondering if I need to use a different storage strategy that will allow seamless program operation while still using RAM storage (do not want to have to recall images from disk).
    I have other CT imaging programs that are running very well with these large data sets.
    This is a critical issue for me as I move forward with LabVIEW in this application.   I would like to work with LabVIEW R&D to solve this issue.  I am wondering if I should be thinking about establishing say, 10 queues, instead of 1, to address this.  It would mean a major program rewrite.
    Sincerely,
    Don

    First, I want to add that this strategy works reasonably well for data sets in the 600 - 700 mbyte range with the 64-bit LabVIEW. 
    With LabVIEW 32-bit, I00 - 200 mbyte sets were about the limit before I experienced problems.
    So I definitely noticed an improvement.
    I use the queuing strategy to move this large amount of data in RAM.   We could have used other means such a LV2 globals.  But the idea of clustering the 2-d array (image) and then having a series of those clustered arrays in an array (to see the final structure I showed in my diagram) versus using a 3-D array I believe even allowed me to get this far using RAM instead of recalling the images from disk.
    I am sure data copies are being made - yes, the memory is ballooning to 15 gbyte.  I probably need to have someone examine this code while I am explaining things to them live.  This is a very large application, and a significant amount of time would be required to simplify it, and that might not allow us to duplicate the problem.  In some of my applications, I use the in-place structure for indexing
    data out of arrays to minimize data copies.  I expect I might have to
    consider this strategy now here as well.  Just a thought.
    What I can do is send someone (in US) via large file transfer a 1.3 - 2.7 gbyte set of image data - and see how they would best advise on storing and extracting the images using RAM, how best to optimize the RAM usage, and not make data copies.  The operations that I apply on the images are irrelevant.  It is the storage, movement, and extractions that are causing the problems.  I can also show a screen shot(s) of how I extract the images (but I have major problems even before I get to that point),
    Can someone else comment on how data value references may help here, or how they have helped in one of their applications?  Would the use of this eliminate copies?   I currently have to wait for 64-bit version of the Advanced Signal Processing Toolkit for LabVIEW 2010 before I can move to LabVIEW 2010.
    Don

  • Large data sets and key terms

    Hello, I'm looking for some guidance on how BI can help me. I am a business analyst in a health solutions firm, but not proficient in SQL. However, I have to work with large data sets that just exceed the capabilities of Excel.
    Basically, I'm having to use Excel to manaully search for key terms and apply a values to those results. For instance, I have a medical claims file, with Provider Names, Tax ID, Charges, etc. It's 300,000 records long and 15-25 columsn wide. I need to search for key terms in the provider name like Ambulance, Fire Dept, Rescue, EMT, EMS, etc. Anything that resembles an ambulance service. Also, need to include abbreviations of them such as AMB, FD, or variations like EMT, E M T, EMS, E M S, etc. Each time I do a search, I have filter and apply an "N/A" flag.
    That's just one key term. I also have things like Dentists or DDS, Vision, Optomemtry and a dozen other Provider Types that need to be flagged as "N/A".
    Is this something that can be handled using BI? I have access to a BI group, but I need to understand more about the capabilities of what can be done. As an analyst, I'm having to deal with poor data inegrity. So, just cleaning up the file can be extremely taxing and cumbersome.
    Some insight would be very helpful. Thanks.

    I am not sure if you are looking for an explanation about different BI products? If so, may be this forum is not the place to get a straight answer.
    But, Information Discovery product suite might be useful in your case. Regarding the "large date set" you mentioned, searching and analyzing 300,000 records may not be considered a large data set at least in Endeca standards :).
    All your other requests, could also be very easily implemented using Endeca's product suite. Please reach out to Oracle's Endeca product team and they might guide you on how this product suite would help you.

  • How to handle large data sets?

    Hello All,
    I am working on a editable form document. It is using a flowing subform with a table. The table may contain up to 50k rows and the generated pdf may even take up to 2-4 Gigs of memory, in some cases adobe reader fails and "gives up" opening these large data sets.
    Any suggestions? 

    On 25.04.2012 01:10, Alan McMorran wrote:
    > How large are you talking about? I've found QVTo scales pretty well as
    > the dataset size increases but we're using at most maybe 3-4 million
    > objects as the input and maybe 1-2 million on the output. They can be
    > pretty complex models though so we're seeing 8GB heap spaces in some
    > cases to accomodate the full transformation process.
    Ok, that is good to know. We will be working in roughly the same order
    of magnitude. The final application will run on a well equipped server,
    unfortunately my development machine is not as powerful so I can't
    really test that.
    > The big challenges we've had to overcome is that our model is
    > essentially flat with no containment in it so there are parts of the
    We have a very hierarchical model. I still wonder to what extent EMF and
    QVTo at least try to let go of objects which are not needed anymore and
    allow them to be garbage collected?
    > Is the GC overhead limit not tied to the heap space limits of the JVM?
    Apparently not, quoting
    http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html:
    "The concurrent collector will throw an OutOfMemoryError if too much
    time is being spent in garbage collection: if more than 98% of the total
    time is spent in garbage collection and less than 2% of the heap is
    recovered, an OutOfMemoryError will be thrown. This feature is designed
    to prevent applications from running for an extended period of time
    while making little or no progress because the heap is too small. If
    necessary, this feature can be disabled by adding the option
    -XX:-UseGCOverheadLimit to the command line."
    I will experiment a little bit with different GC's, namely the parallel GC.
    Regards
    Marius

  • Need to load large data set from Oracle table onto desktop using ODBC

    I don't have TOAD nor any other tool for querying the database.  I'm wondering how I can load a large data set from an Oracle table onto my desktop using Excel or Access or some other tool using ODBC or not using ODBC if that's possible.  I need results to be in a .csv file or something similar. Speed is what is important here.  I'm looking to load more than 1 million but less than 10 million records at once.   Thanks.

    hillelhalevi wrote:
    I don't have TOAD nor any other tool for querying the database.  I'm wondering how I can load a large data set from an Oracle table onto my desktop using Excel or Access or some other tool using ODBC or not using ODBC if that's possible.  I need results to be in a .csv file or something similar. Speed is what is important here.  I'm looking to load more than 1 million but less than 10 million records at once.   Thanks.
    Use Oracle's free Sql Developer
    http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
    You can just issue a query like this
    SELECT /*csv*/ * FROM SCOTT.EMP
    Then just save the results to a file
    See this article by Jeff Smith for other options
    http://www.thatjeffsmith.com/archive/2012/05/formatting-query-results-to-csv-in-oracle-sql-developer/

  • XML Solutions for Large Data Sets

    Hi,
    I'm working with a large data set (9 million records comprising 36 gigabytes) and am exploring the use of XML with it.
    I've experimented with a JDBC app (taken straight from Steve Muench's excellent <i>Oracle_XML_Applications</i>) for writing to CLOBS, but achieve throughputs of much less than 40k/s (the minimum speed required to process the data in < 10 days).
    What kind of throughputs are possible loading XML records from CLOBs into multiple tables (using server-side Java apps)?
    Could anyone comment whether XML is a feasible possibility for this size data set?
    Regards,
    Mike

    Just would like to identify myself (I'm the submitter):
    Michael Driscoll <[email protected]>.
    null

  • Just in case any one needs a Observable Collection that deals with large data sets, and supports FULL EDITING...

    the VirtualizingObservableCollection does the following:
    Implements the same interfaces and methods as ObservableCollection<T> so you can use it anywhere you’d use an ObservableCollection<T> – no need to change any of your existing controls.
    Supports true multi-user read/write without resets (maximizing performance for large-scale concurrency scenarios).
    Manages memory on its own so it never runs out of memory, no matter how large the data set is (especially important for mobile devices).
    Natively works asynchronously – great for slow network connections and occasionally-connected models.
    Works great out of the box, but is flexible and extendable enough to customize for your needs.
    Has a data access performance curve so good it’s just as fast as the regular ObservableCollection – the cost of using it is negligible.
    Works in any .NET project because it’s implemented in a Portable Code Library (PCL).
    The latest package can be found on nugget. Install-Package VirtualizingObservableCollection. The source is on github. 

    Good job, thank you for sharing
    Best Regards,
    Please remember to mark the replies as answers if they help

  • IPad gets very slow with large apps installed ?

    Hi,
    I have a 64GB iPad 3 and I noticed it gets very slow when I install large apps. Apps larger than 1 GB.
    I have bought a number of excellent reference apps, but can not keep them on my iPad together.
    I have to delete one before I can install the next or else my iPad runs into trouble.
    I can have about 5 large apps installed and no more.
    It takes forever to boot, restarts, has delays when typing and crashes all the time with my large apps installed.
    Is this a limitation of iOS 6, or is it because I have dropped below 10 GB of my 64GB storage.
    Does my iPad use the storage for memory?
    I bought a 64GB so that I could use my large apps.
    Sean

    10GB of free space should be adequate. Have you done a Reset?
    How much space is your Other using? You may be able to reduce.
    How Do I Get Rid Of The “Other” Data Stored On My iPad Or iPhone?
    http://tinyurl.com/85w6xwn
    With an iOS device, the “Other” space in iTunes is used to store things like documents, settings, caches, and a few other important items. If you sync lots of documents to apps like GoodReader, DropCopy, or anything else that reads external files, your storage use can skyrocket. With iOS 5/6, you can see exactly which applications are taking up the most space. Just head to Settings > General > Usage, and tap the button labeled Show All Apps. The storage section will show you the app and how much storage space it is taking up. Tap on the app name to get a description of the additional storage space being used by the app’s documents and data. You can remove the storage-hogging application and all of its data directly from this screen, or manually remove the data by opening the app. Some applications, especially those designed by Apple, will allow you to remove stored data by swiping from left to right on the item to reveal a Delete button.
    How to Fix a Slow iPad
    http://ipad.about.com/od/iPad_Troubleshooting/ss/How-To-Fix-A-Slow-iPad.htm
    iPad running slow? How to speed up a slow iPad
    http://appletoolbox.com/2012/07/ipad-running-slow-how-to-speed-up-a-slow-ipad/
     Cheers, Tom

  • Accessing large data sets via UME

    NW 7
    What is the best way to access large user data sets via the UME?  Attribute mapping
    provides String[] for User Profiles but what is the best approach for larger user data sets?
    Say there is a list of user data exceeding 5 thousand records. What UME API/Approach is used to access this type of data.  I want to use UME API to access user data without being limited to 10 multi-valued String Array attributes? 
    Thanks

    NW 7
    What is the best way to access large user data sets via the UME?  Attribute mapping
    provides String[] for User Profiles but what is the best approach for larger user data sets?
    Say there is a list of user data exceeding 5 thousand records. What UME API/Approach is used to access this type of data.  I want to use UME API to access user data without being limited to 10 multi-valued String Array attributes? 
    Thanks

  • XY graphs under-perf​orm on large data sets

    If for example you have 3 signals with 8 million points each and you plot these on a regular waveform graph, the user interface is able to display the data smoothly. All graph palette operations (zoom, scroll etc.) respond in "real-time".
    Put the same 3x8 million points on an XY graph, and you have one sluuuuggish user interface. Scrolling is for example no longer possible in any practical fashion.
    I'm sure a lot of it has to do with the overhead of having all those X-values (often unnecessarily many - as discussed in this idea), but the performance degradation compared to a regular waveform graph (even if the latter is fed twice the amount of Y values for example) is severe.
    Are there ways around this performance issue? Sure. We can e.g. write code that decimates the data we send to the indicator, and refills it when the user zooms or scrolls and therefore needs additional data points. But this requires lots of code, and can never become as transparent/integrated and smooth as an implementation within the indicator itself. 
    And competing products are already there, that's what bugs me right now. I've got colleagues that get such functionality "for free" with the graphing tools they have.
    So, we're about to develop an XControl that makes it possible to present such large non-continuous data sets in a smooth manner. (Ironically one solution is to add data points so that I have continuous data - and then use the regular graph...) But has anyone already done this? Andhowfaroffisa nativeXYgraphindicatorthatmakes such code obsolete?
    MTO

    Have a look to the Topic "Lost reference of main controller within popup" Lost reference of main controller within popup
    "I hate windows popups" and MVC too.
    In newest versions there is a nice popup managed via DHTML (like Web Dynpro does) but basically you should have a common reference to the data somewhere. You can use server side cookies, attributes of your application class, public and static attributes of a specific controller....
    Sergio

  • Are Analytic Workspaces suitable for very large data sets?

    Hi all,
    I have made many different tests with analytic workspaces and i have used the different features (compression,composites...). The results especially for maintenance are disappointing.
    I have a star schema with 6 dimensions. The fact table has 730 million rows, the first dimension has 2,9 million rows and the other 5 dimensions have between 25 and 300 rows each.
    My conclusion is that Analytic Workspaces don't help in situations like mine. The time for maintenance is very very bad not to mention the time for aggregations. I even tried to populate the cube in parts( 90 million rows for the first population) but nothing change. And there are some other problems with storage and tablespaces ( I always get the message unable to extent TEMP tablespace. The size of it is 54Gb).
    Is there something i missing? Has anyone similar problem or different opinion?
    Thank you,
    Ilias

    A few other tips to add to Keith's excellent advice:
    - How many CPU's does your server have? The answer to this may help you decide the optimal level to partition at (in my experience DAY is too low and can cause different problems). What other levels does your time dimension have? Are you loading your cubes in parallel?
    - To speed up your load, partition your underlying fact table with the same granularity as your cubes and place an index on the field mapped to the partition dimension
    - Are you using 10.2.0.3? If so, be very careful with the storage data type you choose when creating your cubes. The default in 10.2.0.3 is NUMBER which has the capability of storing data to 38 significant figures. This usually exceeds what is required for most datasets. If your dataset allows you to use storage of 15 significant figures then you should create your cubes using the DECIMAL data type instead. This will use about one third of the storage space and significantly increase your build speeds (in my experience, more than 3 times faster)
    - Make sure you have preallocated enough permanent and temporary tablespaces for your build. Autoextending can be very time consuming.
    - Consider reducing the amount of aggregation you do in batch. It should not be necessary to pre-aggregate everything in order to get good query performance.
    Generally, I would say that the volume should not be a problem. A single dimension with 2.9 million values is fairly big and can be slow (in OLAP terms) to query but that should not be an obstacle to building it in the first place.
    Good luck!
    Stuart

  • [FPGA] Loop rate very slow: Do FPGA I/O nodes in parallel loops block each other?

    Hi,
    I am using cRIO-9075. Mod1 is NI 9263, Mod2 is NI 9227, Mod3 is 9215.
    Please see my VI attached or the given screenshot.
    The FPGA code is based on the "NI CompactRIO Waveform Reference Library" (it's the lower loop).
    The upper loop was added by me and is writing a waveform from blockmemory to the NI 9263 module (Mod 1).
    The data sampled in the lower loop is running at 1 kHz. The control "AO Update Period" for the upper loop has a value of (for example) 10 (=uS).
    The problem is, that this loop is running much much slower than it should. Once I disable the FPGA I/O node in the lower loop (as done in the attachments), it's running as fast as it should.
    It seems to me, that the FPGA I/O nodes are blocking each other. I tried to figure it out by reading through serveral NI documents, but until now I have no idea how to solve that.
    Can you give me some advices? Some general tipps about the VI?
    Thanks!
    Attachments:
    FPGA Loop Rate.PNG ‏72 KB
    FPGA Main.vi ‏251 KB

    Hi, thanks so far.
    Originally the control was inside the loop. Then I tried if it makes a difference if it's outside.
    Ok, i really seems to be that default value of "100000" for "AO Update Period".
    Starting the VI directly woks like expected. Having "AO Update period" inside the loop makes it possible to control it as it's running.
    But, please see the attachment. When starting the FPGA through RT and setting the appropiate value, it does not seem to work. The oscilloscope show's the same behavior like "AO Update Period" was 100000.
    But when reading the value of "AO Update Period" afterwards (while the FPGA is running), it shows the expected value of "10".
    Having changed the default value to 10 works so far, but I am not able to changed it (see attachment).
    So the problem is: Why is "Read/Write control" not working here? Why is still the default value used?
    Attachments:
    FPGA Loop Rate 2.PNG ‏5 KB

  • Query within the Cursor loop is very slow

    Hi ,
    I have a stored procedure which has Select/Insert operation which is looped within the cursor. The Select uses variables from the cursor, and inserts the data into the table.
    My problem is the peformance. The stored procedure executes in 2 mins if I hard code the where clause values in the Select. Instead if I use the variables obtained from the cursor, the query takes so long (more than 20 mins) to insert the same no of records into the table.
    Below is the snippet of my code
    create procedure sample is
    declare
    v_acct_month number(2);
    v_sp_name varchar2(30);
    cursor v_cur is Select distinct Acct_Month,salesperson_name from period;
    begin
    open v_cur;
    loop
    fetch v_cur into v_acct_month, v_sp_name;
    exit when v_cur%notfound;
    Insert into T1
    Select * from T2,T3.. Where T2.month=v_acct_month,t3.sp_name=v_sp_name;
    end loop;
    End;
    The query is not using the optimizer when the variables are used.The optimizer is used when I hard code the values in the select.
    Please give me suggestions to make this query faster..
    Thanks,
    Arun
    Edited by: [email protected] on Mar 28, 2009 10:18 AM

    Hi,
    Whenever you write code, format it to show the scope of BEGIN, LOOP, IF statements, and so on.
    Type these 6 characters
    &#123;code&#125;
    (small letters only, inside curly brackets) before and after the formatted code, to preserve spacing on this site.
    You've discovered why the tecnique you're using is called "slow-by-slow" processing.
    You don't need a cursor. You may not even need PL/SQL.
    Just write an INSERT statement that reference the table from the cursor and the tables from your current INSERT statement.
    Here's one way:
    INSERT
    INTO     t1 (columns)
    SELECT         columns
    FROM     t2
    ,     t3
    WHERE     ...
    AND     (t2.month, t3.sp_name)     IN (
                              SELECT DISTINCT
                                   acct_month
                           ,        salesperson_name
                           FROM        period
                           );Depending on the details of your case, there may be a better way, such as a 3-way join.

Maybe you are looking for

  • Overall Performance is very slow

    Hi, I have 4GB in PI-DEV and 4GB in BI-DEV server, BI server is running very good and fast, but PI-DEV performace is very very slow even it take 5 munites to login myself... There is no user login in DEV server... NW 7.0 2004s, Windows 2003 OS, Patch

  • GL account mapping

    I have an GL account that represents a recent bond issue and there is an uploaded csv file with all the account groups and ranges defined to which it should be on. After realising that my report amounts were incorrect because of this account not bein

  • Solman 7.1 SP10 delete product system in SMSY

    Hi, Somehow in my Solman 7.1 sp10 a product system is in SMSY and not in LMDB but in this SP I´m unable to delete it using SMSY and as the product system is not in LMDB, I don´t find how to do it. Anyone knows how to delete it. Regards,

  • How to install and run USB device application without NI-VISA environment?

    Hi everyone:       I develop a LabWindows/CVI8.5 application that uses a driver for a USB device created using the NI-VISA 4.6.2. The application is ok when the NI-VISA  environment is installed in PC. But the  NI-VISA 4.6.2 is too big(326M).  Can be

  • Windows Forms with ActiveX PDF viewer steals focus when LoadFile called

    I've been very frustrated with the PDF viewer. I currently have the Acrobat Reader 8.1.2 installed and I've created an extremely simple app that has a main window with two additional child windows that are owned by the main window. I've also set a ti