Analytics / requirement model

It is a puzzle that I put myself after a discussion to make choices between SQL and PL/SQL - is not urgent not important and not serious.

If I query dba_extents for a given table (e.g. sys.source$) measure information looks like this:

Select file_id, block_id, blocks

from dba_extents

where owner = 'SYS '.

and nom_segment = '$SOURCE. '

order of file_id, block_id

;

FILE_ID, BLOCK_IDBLOCKS

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

115048
181688
181768
181928
182888
184408
1100728

...

177568128
177696128
177824128
178080128
189984128

...

1907521024

80 selected lines.

I have a piece of code that bed the exent list, joins a list of numbers to enumerate each block in each scope, sorts the blocks of file_id and block_id, applies to an ntile (12) for the result set, and then selects the first and the last block in each tile to produce an output which is essentially 12 rows (first_file_id first_block_id (, last_file_id, last_block_id)-which I can convert it to a set of coating lines for the table rowid.  (This is essentially what dbms_parallel_execute when you create pieces of rowid - except that it uses the PL/SQL to do).

My SQL does exactly the necessary work, but is significantly slower than the equivalent PL/SQL - we're talking only a few seconds on the line for very large objects, so the difference is not relevant for the purposes of actual production - largely, I think, because I have to increase the size of the initial result set between the number of extensions and the number of blocks and then narrow down again so that the PL/SQL can simply browse the definitions of making simple arithmetic.

I'm sure that there is a way of MODEL clause to avoid explosion, and I'd like to see if anyone has the time, but I keep thinking I'm close an analytical solution, but can't quite get there. So if anyone can find a solution that would be even better than a solution of model - failing that someone proves that it can be done effectively in simple analytical SQL.

UPDATE: I forgot to declare explicitly that point to the explosion of the block and ntile() was that it was a simple strategy to get the same number (+ /-1) block in all ranges of rowid.

Concerning

Jonathan Lewis

Post edited by: Jonathan Lewis

The solution:

[Update: Please see https://stewashton.wordpress.com/2015/07/01/splitting-a-table-into-rowid-ranges-of-equal-size/ for an update solution, a bit cleaner.] Thanks Chris227, I learned for the function WIDTH_BUCKET]!

with data as (
  select (select blocks / 12 from my_segments) blocks_per_chunk,
  object_id
  from my_objects
)
, extents as (
  select
  nvl(sum(blocks) over(
    order by file_id, block_id
    rows between unbounded preceding and 1 preceding
  ),0) cumul_start_blocks,
  sum(blocks) over(order by file_id, block_id) - 1 cumul_end_blocks,
  blocks, block_id, file_id,
  data.*
  from my_extents, data
)
, extents_with_chunks as (
  select
  trunc(cumul_start_blocks / blocks_per_chunk) first_chunk,
  trunc((cumul_end_blocks) / blocks_per_chunk) last_chunk,
  round(trunc(cumul_start_blocks / blocks_per_chunk)*blocks_per_chunk) first_chunk_blocks,
  round(trunc((cumul_end_blocks+1.0001) / blocks_per_chunk)*blocks_per_chunk)-1 last_chunk_blocks,
  e.* from extents e
)
, expanded_extents as (
  select first_chunk + level -1  chunk,
  cumul_start_blocks, file_id, block_id,
  case level when 1 then cumul_start_blocks
      else round((first_chunk + level -1)*blocks_per_chunk)
    end start_blocks,
    case first_chunk + level -1 when last_chunk then cumul_end_blocks
      else round((first_chunk + level)*blocks_per_chunk)-1
    end end_blocks
  from (
    select * from extents_with_chunks
    where first_chunk_blocks = cumul_start_blocks
      or last_chunk_blocks = cumul_end_blocks
      or first_chunk < last_chunk
  )
  connect by cumul_start_blocks = prior cumul_start_blocks
  and first_chunk + level -1 <= last_chunk
  and prior sys_guid() is not null
)
select chunk,
min(file_id) first_file_id,
max(file_id) last_file_id,
min(block_id + start_blocks - cumul_start_blocks)
  keep (dense_rank first order by cumul_start_blocks) first_block_id,
max(block_id + end_blocks - cumul_start_blocks)
  keep (dense_rank last order by cumul_start_blocks) last_block_id,
max(end_blocks) + 1 - min(start_blocks) blocks
from expanded_extents
group by chunk
order by chunk;

Tags: Database

Similar Questions

  • Highlight the required fields

    Hello. I have a form with many elements like select the list, text box, and date picker. These are the required fields of the form with the required model and required value set to Yes also. I want to emphasize these required fields with the pale yellow background when loading the page. Anyone can guide me please?

    For Multi Select Value:

    $('.select2-choices') .css ('background-image', 'none').css('background-color','yellow');

    And then, you add a line like this for each required field:

    $(' #s2id_ITEM_NAME.select2-choice') .css ('background-color', 'red').css('background-image','none');

    Replace nom_element with the name of the element in the page, something like P101_LOGIN, etc.

    Sergio

  • models... themes... Please stop me from throwing my laptop in the trash...

    Hi all

    A pretty simple task I thought... and the term ' easy when you know how "sounds in my ears...". (and Ive read the docs and looking for the solution for the last few hours...)

    I have to switch themes... Now, I'm trying to get a custom template to an another application/theme in my new theme...

    I think I have the right to replace a model... I don't really want to, or need to do that...

    I have the option to eFamille to a model... Apparently the opposite of what I want to do...

    I have the ability to copy a template from another application... (but it is said that there are already..)

    I'll edit my theme (green spring by the way...), and then select the drop-down list to LIST the templates... and this is not.

    I'm clearly missing something... ID be really grateful, if someone could help me just copy a model of a theme for my new theme, or subscribe to the model that seems to exist...

    Thank you very much

    Richard

    fe1e7616-f604-4df5-83d7-fcea1858cbd5 wrote:

    Please update your forum profile with a real handle instead of 'fe1e7616-f604-4df5-83d7-fcea1858cbd5 '.

    I have to switch themes... Now, I'm trying to get a custom template to an another application/theme in my new theme...

    I'm clearly missing something... ID be really grateful, if someone could help me just copy a model of a theme for my new theme, or subscribe to the model that seems to exist...

    Yes, it's not obvious:

    1. go into shared components > models.
    2. click on create >.
    3. Select the required model type.
    4. Select a copy of a model existing.

    5. follow the rest of the wizard to identify the required application, theme and style.

    Also note that it is recommended to create the new theme and copy the custom templates required prior to switching. In this way, you avoid the frustration of the reallocation of a large number of model classes, then to discover that the new theme is a model for the obscure class you have assigned to your more complex report model...

  • Changing the values of the project

    Summary

    Here change the link reference and report Suite fields or be able to migrate all between projects. Lack of one of these options, I want to know that the values of these fields don't really count.

    Example values:

    Basic reference: link Analytics: report Suite
    DPS 2014 Appcom.mycompany.MyAppcom.mycompany.MyApp
    AEM Mobile Appcom.mycompany.myappdevcom.mycompany.myappdev

    The correct values have been changed to protect the innocent.

    Details

    Currently, we had weeks of progress by creating a new application AEMM to replace our DPS 2014 application. The problem that has developed is the AEMM project, we created have values of different parameters in two places which do not match the existing application of DPS. Because we couldn't find a way to change these values, we have created a new project with the correct values. Once we did that, we discovered that there is no way to move content between projects. So we are facing days of work to address this problem. That's assuming that the values of these fields have an important effect.

    Questions

    1. What are the effects happen to have value do not match in the field link reference? Reading this forum leads me to believe that the feature gives even does not yet.

    2. What are the effects happen to have value do not match the scope of report Suite? I still have to find a good reference for analytical how will be between these two editions of the DPS/AEMM.

    You want solutions

    1. in an ideal solution, we could get help from Adobe to fix the values in the original draft of AEMM

    2 or a way to pass the work weeks of the old AEMM project to the new, corrected one.

    3. we would be willing to leave the values as they are, provided it would have serious consequences.

    4 and if this is not possible, we will have to carefully recreate the settings in the new project, using the old as a guide, the hierarchy and content.

    Short answer: continue to use the previous project. You don't have to worry about these values for the migration.

    1. What are the effects happen to have value do not match in the field link reference? Reading this forum leads me to believe that the feature gives even does not yet.

    That is right. The reference link field is not supported at the moment, so there is no problem having a value do not match. (Link reference was intended to be used for the deep link outside of the app, but right now, we use dps. .)

    2. What are the effects happen to have value do not match the scope of report Suite? I still have to find a good reference for analytical how will be between these two editions of the DPS/AEMM.

    During the migration of DPS to AEMM, it is good to use a different value in the field of the report. Both platforms use different methods to collect Analytics requires different reports. If you have Adobe Analytics, you will want to ensure that your analytical information is implemented correctly in the master settings. If you need assistance with setting up Analytics, contact Adobe support. Support information are available when you connect to the portal using a master administrator account.

    Another question that you did not mention, but might want to consider. When you build your application, you specify a Bundle ID. When you build your Mobile AEM application, it is important to use the same Bundle ID you used when you build your DPS application so that you can update in the store. In addition, it is a good idea to use the same Bundle ID for Android and iOS apps for certain services such as In - App Messaging.

    Migration resources:

    Strategies for the improvement of DPS to MEA Mobile applications

    Migrate the content of folios DPS for AEM Mobile

    I hope this helps. Let us know if you have any other questions.

  • How can I run my validations after confirming that a specific field is not NULL?

    Hello

    How can I run my validations after confirming that a specific field is not NULL?

    One of my validation needs to ensure that a specific page element is not NULL, then I use the option 'required value' of the page element, but it seems that the validation is performed before the option "required value.

    I know I could create 2 different validations for each case, but I think it would be nicer if I could work through the only validation and leave the APEX to manage the field validation is NOT NULL

    Best regards and thanks for reading

    According to my experience, it appears that the APEX is going through all THE postings...

    IE, if a "failure" of Validation continues.

    It's actually beneficial for the end user, because it will get ALL the errors in the form he or she made... not just a first.

    workaround solution:

    1. Remove the 'required' on the element value (.. but keep the "required" model)
    2. Add the NOT NULL check to your personal validation process.

    Very probably, the 2nd one will be in a PL/SQL function return error text.

    MK

  • Help with incredible registration / Product Code procedure

    I bought 13 items first packaged and by trying to find/use the process series/product code number.

    I've been to the https://redeem.licenses.adobe.com/getserial site where you are supposed to enter a redemption code that 'Help' are 24 alphanumeric characters and located on the box or sleeve.

    There are six boxes in the entrance which can only mean that 4 characters should be in each box.

    There is no code redemption on the box and the sleeve has a number that does not match the format or the number of characters specified above.

    There is a single item of on handle and box 8-digit numbers that can not be.

    Under the sleeves Figure 8 number is a code that do not meet the 24 characters or groups of 4 required model.

    The code looks exactly like this, except that I substituted XXX instead of two sets of letters below (because if it is a product code, I won't post).

    DHS/A, PRE, 13.0, MAC, GEN, XXX, LRE

    / WWF/D/XXX

    Now there is no point for me and I don't see how there is nothing I can get above that meet the entry requirements for the product to https://redeem.licenses.adobe.com/getserial code entry

    It must be the most hostile registration procedure that I've met in all my 25 years of experience with computers and software.

    firedeva

    If you bought the box of first 13 items, you can expect something like that

    1. a box rectangular thin hard cover (colorful Adobe) in which is inserted a white rectangular box.

    2 in this rectangular box white installation discs, one for Windows and one for Mac - each drive is in its own envelope.  There is probably a manual mini in this area also.

    3. make sure the white rectangular box. On the back of this box must be a label. This label must contain the serial number of the product for the two installation disks.

    xxxx - xxxx-xxxx-xxxx-xxxx-xxxx

    The serial number is clearly identified as serial number.

    You know very well if the seller has sold you the product with a redemption code?

    RTA

  • Can I buy image, heavily modify it and use it?

    I work for this software company that sells photo editing tools.  It is a bit of question 101, but I found a similar one on "common issue".

    Y at - it any legal restrictions about how much you can edit and use these photos?  In my case, I would like to take a few vector icons image, change colors and forms may be and use them as diagram on technical article, as the white paper of what Adobe.

    Adobe Analytics help | Model of data storage for data Workbench

    You can read the license agreement here to see where your project is.

    http://wwwimages.Adobe.com/content/dam/Adobe/en/legal/servicetou/Adobe_Stock_Terms_en_US-2 0150313_hpc.pdf

    A good general rule is that the images can be used "as part of a project" but not "as the project itself. If you use the images in a document you should be well based on the info you provided. You can edit the images as much as you want.

    Example:

    It is wrong to make a photo book of images under license and the sale of the book with images like the actual content. Very bad.

    Make the documentation pertaining to a product and using the images to show with in the document where the image is not part of the actual product are generally very good.

  • Possible to copy templates from one application to another?

    4.2.1

    Theme 25

    Hello

    I have an application where the developer seems to have created its own model - body one tab-2 columns. Is it possible that I can use this template on my page, which is another application in the same environment? I don't see the option to copy under shared-> model components. But she copy the model of the same application.

    Also, can copy us the template from one theme to another? Or we can copy the model on the same topic only

    Thank you

    Ryan

    Yes, it is possible, but perhaps not obvious:

    1. go into shared components > models.
    2. click on create >.
    3. Select the required model type.
    4. Select a copy of a model existing.

    5. follow the rest of the wizard to identify the required application, theme and style.

  • How to create a validation "not null" unique for all elements in a page?

    Hello world

    How to create a validation "not null" unique for all elements in a page? I love textfields. Rather than create "not null" validation for each article, I would like to create a single validation control that will be used

    Thanks and greetings
    Umer

    Nice1 wrote:
    Bob, like u said I did the following:

    (1) less to create a button, there are 9 elements, and for each item, I put in the light of 'yes '.
    (2) under the button Delete, there is 1 point and have in light of the 'Yes' for the item
    (3) validation of the page defined for the 9 items under 'create a button' and put it to fire when 'create' button clicked
    (4) the page validation set for 1 number under 'remove' button and put it on fire when "delete" button clicked

    now, when I click on the 'create' button it shows same for the item under the "Delete" button that's a required element

    Sorry, I do not see this note. The required model will not work, there is no way to attach it to the button.

    The best solution is that the answer only a few answers to the top

    Create 2 validations page type as a PL/SQL with code

    1st validation
    
    :P1_ITEM1 IS NOT NULL and :P1_ITEM2 IS NOT NULL ...... and :P1_ITEM9 IS NOT NULL  include all 9 items
    
    Set the When Button Pressed to the CREATE button
    
    2nd validation
    
    :P1_ITEM10 IS NOT NULL
    
    Set the When Button Pressed to the DELETE button
    

    I think that this will be the best way to do it.

    Published by: Bob37 on April 27, 2012 12:02

  • Error 1074395241: The model descriptor does not contain the data required for the corresponding rotation invariant.

    Hi all

    I use the model Match 4 IMAQ to detect the angle of rotation of an image of model. However, it displays the error: "error 1074395241: the model descriptor does not contain the data required for the corresponding rotation invariant." What exactly is the problem? How to solve this problem? The details are explained below.

    My project is a bit complicated. Part of the block diagram containing the IMAQ Match model 4 is illustrated below:

    The source image is a series of images of images read from an AVI video (I used a loop for to process the images frame by frame). The image of the model is an area of the first selected image. So, this means, the user selected the ineterst object in the first frame of the video, and each of the following images to find the object corresponding interest & determine its rotation angle. When I run the above diagram, there no error. However, it shows the angle of rotation zero no matter what it is 'really '. Therefore, I changed the schema by adding parameters, listed below:

    But in this case, when I run it, it shows the error I mentioned in the subject line.

    If you need more information about my project to identify the problem, please let me know.

    Thanks in advance.

    S ' Please example from model that comes with labview First
    Go to labview Help > find examples and you can search for example.
    -You create model with angle range and what kind of special criteria you want to use.
    -To do this you must use IMAQ learn pattern before using IMAQ model Match 4
    Reference:http://zone.ni.com/reference/en-XX/help/370281U-01/imaqvision/imaq_match_pattern_4/

  • Game room requires a video card that supports shader model 3.0 your video card does not meet these requirements

    I downloaded Microsoft Games for Windows - Live. I then downloaded & installed the game games room. When I tried to play it I got this error: game room requires a video card that supports shader model 3.0 your video card does not meet these requirements: How can I fix? Will this work? http://www.download3k.com/system-utilities/system-maintenance/download-graphics-card-driver-update.html

    Hello Ann42633,

    If you have not changed the video card that you purchased your computer, you can visit the Dell Web site and use the service tag to determine the video card.

    In addition, you can locate the type of video card you have by the following text:

    -Click Start

    -Type Device Manager into the start menu search box, press enter

    -Develop graphics cards

    You must also obtain the appropriate driver from the Dell Web site and update your video card.

    Hope this helps

    Chris.H
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Revolution Analytics R - RxExec does not work on multiple cores when Random Forest model run.

    I have a model of analysis of the survival of random forests for learning and trying to run on Multicore Cluster using the revolution analytics company R 7.1.0 version.

    I used the code below

    Library (RevoScaleR)
    rxSetComputeContext (RxLocalParallel ())
    rxOptions (numCoresToUse = 5)

    And then execution of the RxExec to perform the function of random forests by using the randomForestSRC package.

    I could see 10% CPU utilization which is by default kernel 1.

    Am I missing something here? Must the randomForestSRC package be a parallel?

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)

    If you give us a link to the new thread we can point to some resources it
  • CSQ Call Distribution summary report customized with 5s and 20 s model for UCCX 10.6 required

    Dear all,

    We have UCCX with recently upgraded to 10.6 HA. After upgrade, we are not able to generate the CSQ Call Distribution report for every 5/20 sec.

    We contacted TAC and found we need to have autonomous cuic but we donot have in our environment. There is demand for improvement already triggered with Cisco for this defect, Cisco still to develop fixed a bug for this version.

    Ask you to provide me with this model of the said report to import into our UCCX of 10.6 to generate reports required by our care.

    Had the same problem after upgrade of 8.5 to 10.5 UCCX. I was able to modify an existing report to get 5 seconds interval.

    I exported the existing report. Imported in CUIC stand-alone server, query list value with interval of 5 seconds:

    select 5 as ID,'5' as value from table(set {1})
    Also changed the column names in the report. With 5 seconds interval, we have 4 great call distribution intervals: 0-5 sec, 0 to 10 sec, 0-15, 0-20 sec. Unfortunately, when I downloaded my report to the initial report UCCX CUIC was broken (I think because of the internal report id duplication), but the new report works very well. Check out the screenshots and my below custom report template.
  • Model name required for vaio does not work. WEB USELESS INSTRUCTIONS.

    I need a new motherboard for my Vaio pcg - 61611L NONFUNCTIONING. Statements of your website to find my model name require the laptop turned on, which is currently impossible without the motherboard, I'm buying.

    that I can't buy because I don't know what model to get name. I can't know because YOUR INSTRUCTIONS ARE USELESS.

    Label service for this device is c104884v. Serial number is 27526839 3002127.

    alienjack,

    Your model is VPCEE23FX/T and the card mother n/p is B99861626 and you can order through Sony parts @ 800-488-7669.

  • Extended Analytics (how to share the model to the other user)

    Hello

    Can any one please tell me how to share the extended Analytics (already created model) model to the other user.

    Thanks in advance,
    MB

    Scopes analytical models are user specific, although I think that that has changed after that some released in the series 9.x. Hyperion, at one point had a utility that allows you to copy the template from one user to another, but I don't know if that still exists. It may just be easier to have users to recreate it in the short term since it is really just a problem of selection of metadata.

    -Chris

Maybe you are looking for

  • Vista - cannot find the printers after installing KB2347290

    When I install Windows Vista (64 bit) updated KB2347290 nor my network HP LJ 1320 and HP Photosmart 6280 printers are the Vista computer. Printers normally work my 2 XP computers. If I uninstall Kb2347290 I can reuse the printers on Vista computers.

  • Printing problem with rain on pro printing studio

    Hello world I have the printer pro100 for 2 weeks. I could make a few nice prints from the impression of Lightroom (5.7) module using my wireless network. I just recently added the "pro printing studio" plugin, but I can't make an impression. Once th

  • Rocket freezes at startup

    My rocket worked perfectly until today. The battery went dead so I plugged it in my PC as usual to load. When I turned it on it gets as much as Sansa logo, then freezes. I have to hold the switch for about 30 seconds to turn it off. I connected it to

  • Replace hard drive now get 16 error when I try to start Photoshop CS6

    Error 16 when trying to start photoshop CS6 after replacing the hard drive failed.

  • Download cs3 bug

    I am trying to download CS3 design premium to reinstall.Download the CS3 productsI get on the page where I have to stay connected before downloading, but I am already connected and never begin to download!I tried other versions of CS 4 and 5, and the