The right way to store the results of the query

Hey wizards Oracle,.

I have a few questions that take a long time to run. Given that the results of these queries change only once a day, I will execute queries every morning and store their results in a table.

I was going to serialize them in chains to the CSV format and then store them as CLOB. But shit, Oracle is a data table, storage system! This is reinventing the wheel within a wheel.
Then I thought about creating one table per query would be the right way to store their results. But ordinary tables data recovery would be slow, because I would need to create an additional of ORDER_BY column to maintain the order of the results of the query.

It seems that there is a way to store varrays in the LOB columns, but it does not seem to be appropriate.
There may be a caching mechanism that could help?

Does anyone know the proper way to store the result of a query?

What you describe is a reinvention of the materialized views.
Have you considered using them?

----------
Sybrand Bakker
Senior Oracle DBA

Tags: Database

Similar Questions

  • bitmaps in ListField - is the right way to do it?

    I want to create an image list (named 0.png, 1.png, 2 png etc.) and I want to put them in a ListField. in the reminder for this listfield class, I have the following:

    public void drawListRow(ListField list, Graphics g, int index, int y, int w)
    {
        for (int i = 0; i < list.getSize(); i++)
        {
            b = Bitmap.getBitmapResource(i + ".png");
            g.drawBitmap(new XYRect(0, i*(list.getRowHeight()), b.getWidth(), b.getHeight()), b, 0, 0);
        }
    }
    

    is this the right way to make a list of images (i.e. it is the fastest way)?

    I would like to store the images in a table of initialized Bitmap previously, rather than read them each time that a line should be drawn.

    Also, drawListRow is only meant to draw a single line, whenever it is called. Finally, I would not build a XYRect each time, which makes the work more garbage collector. Use the version of drawBitmap plus-arguments:

    public void drawListRow(ListField list, Graphics g, int index, int y, int w) {
        g.drawBitmap(0, y, w, list.getRowHeight(), image[index], 0, 0);
    }
    

    ( image is the array of bitmaps initialized using the previous loop.)

  • What is the right way to include search terms in your page

    Whether you have a web page that is on a certain subject and holds information displayed on the page.  What is the right way to include terms that you would like this page to see the place looking for but don't want necessarily to display on the page?

    I didn't know if including the key words of research down in small characters with invisible color was the right way.

    I didn't know if including the key words of research down in small characters with invisible color was the right way.

    ABSOLUTELY NOT!  This practice will get your site banned or blacklisted from search engines.  It is considered to be a Black Hat tactics to try to trick the engine of research in order to generate results of traffic to your site.

    Use rather a lot of rich and relevant keyword text and good semantics (h1, h2, h3) supplement in the body of your pages.   At the time, search engines you will find.

    Some excellent links on Search Engine Optimization:

    Google SEO Starter Guide (PDF)

    Can better accessibility of the Web: better search ranking?

    High rankings Advisor

    SEOmoz.org - Guide from beginners to SEO (1 html page)

    SEO Chat

    Submit site maps to 4 major search engines

  • I close Firefox the right way every time. Why dose he keep saying opps seems firefox crashed... Each time...

    I checked all of the updates and there is no... Why dose Firefox keep saying OPPPPPS well this is embarrassing, seems that your session broke down... Well I know not down because I close every time the right way to dose... Can someone tell me how to solve this problem... It's really annoying... Also, I tried each and everything I thought to try and nothing works...

    Hello Marlin29, this is currently an issue in firefox when you close all firefox windows open first and then close the application subsequently - the bug should be addressed in a more recent version of firefox.

    a workaround in the meantime, you could close firefox (via firefox > quit) while the browser window is still running or try this: enter: config in the firefox address bar (confirm the message information where it appears) & search preference named browser.sessionstore.resume_from_crash. Double-click it and change its value to false.

  • What is the right way to stop an external hard drive please?

    What is the right way to stop an external hard drive please?

    Take it down to disk utility

  • What is the right way to recharge the iphone 6

    What is the right way to recharge the iphone 6?

    Hello

    Follow the instructions here to recharge your iPhone:

    Recharge your iPhone and iPod touch - Apple Support

  • The screen upside down - why? How can I return it the right way up?

    My screen is upside down, no idea how it back to the right way to the top?

    Press Ctrl & Alt keys and use the arrows to rotate back.

    According to the graphics card on your computer, these can be alternatives.

    Right click on the desktop | Graphics options | Rotation.

    Right click on the desktop | Screen resolution | Orientation.

  • What is the right way to allow multiple developers working on the same .uir using Subversion?

    We are two developers working on the same .uir at the same time. Y at - it all the tools that would allow us to merge our own changes? If not, is there a way to avoid us to make changes at the same time.

    For now we are only two, so the problem could easily be fixed by talking or other shipping when the changes should be applied. In any case, I would like to know the right way to work to ignore this issue.

    Thank you!

    Enjoying a beautiful UIR: Options / Save in Text Format...

  • How to change dyou from Korean to English and time date thing dones t work is English version 1.0 of the right way to do it on a wiodows xp home

    How can we change from Korean to English and time date thing doesn t work is English version 1.0 of the right way to do it on a windows xp family

    Hello

    Refer to these...

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-windows_programs/how-do-you-change-Korean-to-English-please-help/0adfb674-886d-440d-8a86-37adcb9a305b

    It comes to English instruction to change the regional language. This will not change any Korean in all English unless your computer is running XP Pro Corporate. The only way to change all Korean at all English is by reinstalling Windows with the English version.

    http://www.computing.NET/answers/Windows-XP/Windows-XP-language-from-Korean-to-English/178270.html

  • What is the right way to add a language?

    Hello
    I wanted to show traditional Chinese web pages with Chinese characters
    (for example, hk.yahoo.com).

    I walked into the tab Control Panel / regional and language options/languages
    and choose "install files for East Asian languages".   He asked for the XP CD,
    installed something and seemed to work.

    However, it seems to have turned on a few items for the language entry,
    from what I see in the boot options.  I don't want to enter the Asian languages,
    show only the Chinese web pages.

    What is the right way to set up and get rid of all this stuff related to the input method?
    (the first 4 points here)

    http://ImageShack.us/photo/my-images/341/StartupItems.jpg/

    Richard,
    I have done work similar to what I described.

    I deselected "install files for East Asian languages" as I mentioned above,.
    removed startup items which appeared in msconfig (you can see the 4 in the JPG I posted)
    and restarted.  What this does in fact, I'm not sure.
    Is it uninstalled or disabled just something, I'm not the wisest.
    (For example, the fonts themselves)

    I open IE8 and went to a page where the Chinese characters should be displayed.
    Instead of characters, the text appeared as small squares. But after playing with
    view/encoding, it began to appear normally.  What ever he did, he also worked for Firefox.
    I found a page posted elsewhere mentioned IE8 can you will prompt to download the
    Chinese police if it is not installed.  This moved not, makes me wonder if it was
    there all along.

    Of course, all the other windows dialog boxes and other parts of the interface.
    are English, as it should.  As far as I know, looks like it works the way
    I wanted to.

  • I wipe my keyboard and mouse with a paper towel and the screen flipped sideways, how I recover the right way? /

    I wipe my laptop and keyboard mouse with a paper towel and the screen turned sideways, how I recover the right way?

    Hi ken1957,

    Try pressing Ctrl +or to rotate the screen.

  • On a 32-bit vista business system, what is the right way to recover from a damaged NTLDR file that prevents the system from booting?

    On a 32-bit vista business system, what is the right way to recover from a damaged NTLDR file that prevents the system from booting?

    Also, is there a powerful device filled, utility like Winternals Windows PE boot, I can download for the resolution of problems like this and others?

    Thank you in advance!

    Have you had a glance at this startup repair disk?

    Download the ISO on the link provided and make a record of repair time it starts.

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu.

    When you have changed that, insert the Bootable disk you did in the drive and reboot.

    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Link above shows what the process looks like and a manual, it load the repair options.

    NeoSmart containing the content of the Windows Vista DVD 'Recovery Centre', as we refer to him. It cannot be used to install or reinstall Windows Vista, and is just a Windows PE interface to recovering your PC. Technically, we could re-create this installation with downloadable media media freely from Microsoft (namely the Microsoft WAIK, several gigabyte download); but it is pretty darn decent of Microsoft to present Windows users who might not be able to create such a thing on their own.

    Read all the info on the website on how to create and use it.

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    ISO Burner: http://www.snapfiles.com/get/active-isoburner.html

    It's a very good Vista startup repair disk.

    You can do a system restart tool, system, etc it restore.

    It is NOT a disc of resettlement.

    And the 32-bit is what normally comes on a computer, unless 64-bit.

    See you soon.

    Mick Murphy - Microsoft partner

  • The right way to face the camera and camera on standby?

    How one brings the camera back to life after the unit returns to standby mode?  What is the right way to manage the device sleep and wake?  Any help is appreciated.

    Hi Sucroid,

    I intend to produce a sample that shows this I hope that during the holiday season.

    Here is some information that can hopefully help you get started...

    When the screen goes to sleep, off camera equipment.  There is nothing you can do about it today, outside of the application one keep awake in your application window. (value SCREEN_PROPERTY_IDLE_MODE SCREEN_IDLE_MODE_KEEP_AWAKE).  Note that this won't save you a user who clicks the power button to force the unit in standby mode.  It will protect you against a situation where your application goes to background or another application requires video resources that are used by the camera.  In these two situations, your application will lose his viewfinder.

    But all is not lost!  There are some events of status, you can listen to that lets you know that the camera stops.  You can listen to these events either with an attached status_callback (applied when starting the viewfinder for example), or by authorizing explicitly state the events using camera_enable_status_event() and waiting for impulses of status.  All these things are detailed in the documentation for the API of photo here: http://developer.blackberry.com/native/reference/bb10/com.qnx.doc.camera.lib_ref/topic/overview.html

    The corresponding lights events are:

    CAMERA_STATUS_RESOURCENOTAVAIL - this event is logged every time that the camera is about to close.  If you have previously called camera_register_resource(), this is the event that listen to you to know that all your camera buffers are about to be démappés - so stop all logic that looks at them and then camera_deregister_resource() camm.  If you do not physically the buffers of viewfinder, then necessarily no need to use this registry/invert mechanism.  It's just there to provide warning and to activate the drivers of the device for you to recognize that it is safe to unamp wait for memory.  Each time the screen goes to sleep, the power button is pressed, or another application has need of resources of the camera, you will get this signal.  If you are curious to know the reason, you can check the 'extra' uint16_t argument in the callback of the situation for one of the camera_powerdownreason_t values.  All video recordings currently active or encodings auto-terminera when this signal is received.

    CAMERA_STATUS_POWERDOWN - event status is reported immediately after the hardware of the device is turned off.  You can't interact more with the camera until this condition is removed.  Note that to capture this event, you will need the user of the status of the event-mode (camera_enable_status_event()) interface, because any reminder of status you can have attached when starting the viewfinder will be cleaned up when the viewfinder stops.

    CAMERA_STATUS_POWERUP - event status is reported immediately after that camera material is fed up after having previously be put off.  Even not not on using status of event-mode interface (camera_enable_status_event()) applies in this case too.

    So, what can you do with this information?

    Well, tuned for CAMERA_STATUS_RESOURCENOTAVAIL will tell you when your viewfinder will close.  At this point, your application must enter a State where he is waiting for an event that will wake it again...

    In most cases, this is the event browser that indicates your application is active or foreground again (NAVIGATOR_WINDOW_ACTIVE or equivalent).

    So when your application is told by browser is it back to the foreground, you can then restart the viewfinder using camera_start_photo_viewfinder() or camera_start_video_viewfinder() according to the requirements of your application.  You will still need to follow the same recipe to start the viewfinder as a cold start your application (for example. Wait for the window of your viewfinder to be filled), but you will not need to reconfigure all the settings.

    OK... which covers 99% of the use cases that you will encounter.  Use case for the 1% remaining, you will need to follow for this CAMERA_STATUS_POWERUP event.  Why?  Well, there is a race condition when things down, in which case if the user wakes up the device while the camera is closing (eg. they struck twice in quick succession, the power button), then the camera will enter its off State, but navigator may actually not report your application it becomes idle.  This is because the infrastructure of power management is waiting actually for the material from the camera to the power off until the system goes to sleep.  If the user wakes up the device upward, then this action is canceled, and the unit enters never actually standby.  In this case of corner, navigator does not say your app to become active, again because he never told your application becomes idle.  So what are you doing?  Well, I have 2 suggestions:

    1. You can follow to CAMERA_STATUS_POWERUP using the event interface mode for the camera equipment.  It's actually the more correct approach and what we are doing internally with the BB10 camera App.
    2. You can use a timer to try to wake up the camera in the case of this corner case occurred.  for example. wait 5 seconds after the signal CAMERA_STATUS_RESOURCENOTAVAIL.  If your application has not been made inactive by browser, then you can try turning it back on the camera.

    I hope this help get you pointed in the right direction and still... I plan on collecting a best-practice appropriate sample that illustrates exactly how to do this when the weather!

    See you soon,.

    Sean

  • What is the best way to store the RCS for an insert/update in this rec

    Oracle on Win 64 non-conteneur 12.1.0.2

    When a record in one table is inserted or updated, what would be the best way to store the RCS for this record in this folder.

    I thought of a line after trigger, but did not know if this trigger to store the current_scn would still fire that trigger again (recursive trigger).

    Someone at - he a good idea of what the best way is to do?  The devs don't want to store the pk and the SNA in yet another table...

    Yes, row_dependencies would be the best way to go.  But mgmt doesn't recreate all tables for this.

    3rd party applications retrieve data from tables (all data).  We are looking for a way for them to just pull what is new or updated updated since their last sweater.

    I suggest that you try again and give all OF THE REQUIREMENTS.

    You have rejected ANY answer given and he justified using 'hidden' on what knowledge management or the devs want or do not want to. Stop making us guess what are the requirements and constraints. If you want a real answer then tell us ALL the news.

    When a record in one table is inserted or updated, what would be the best way to store the RCS for this record in this folder.

    Solomon answered repeatedly. If you want to add a column to a table to store the then "best" SNA is to let the Oracle to do this for you automatically by using the DEPENDENCY LINE.

    As he says also re-create the table to add this clause will be MUCH MORE EFFECTIVE that everything THAT you can do it manually. It will be also more accurate because Oracle will fill the value ORA_ROWSCN with the SNA at the time the line was committed. You, as long as user, can't fill a column in function when a line is engaged since real VALIDATION belongs to a transaction, not the line or the trigger that you use.

    Yes - there are two drawbacks to this method:

    1. you need to re-create the table

    2. you cannot add an index to this "hidden" column

    The devs don't want to store the pk and the SNA in yet another table...

    Then? Who cares what the devs want to do? You want the BEST solution? Next, you will need to put aside personal preferences and determine what is the 'best' solution. Why it is important that certain dev wants to do this or not?

    OK, the problem of biz is now, 3rd party external users are an all-wheel drive large number of tables in the database via the API that we wrote.  That was obviously interrupted OLTP during the day.  To reduce to the minimum, we want for them just to extract data that has been inserted/updated since their last sweater.

    It is the definition of a "replica" DB Then why don't you consider a real replicated DB? You can use DataGuard and have replicated DB which is read only that can be used to generate reports. Oracle does ALL the work to keep ALL the tables in sync. You and your developers do NOTHING!

    We thought that store the RCS higher their last sweater would allow the API to extract only data with YVERT higher than their last data pull CHN.

    OK - except you keep rejecting solutions actually do. Ask you questions about the SNA stored in the same table, but then reject the solution that does this. And then you add your "devs" don't want to store the info in a new table either.

    Then your solutions must ONLY use the replication or Log Miner. The REDO logs have all changes, if you want to extract yourself. Replication (e.g., DataGuard) will use these logs for you to maintain a replicated database.

    We thought about it, but recreate all tables in production with ROWDEPENDENCIES as well as dealing with CF and other dependencies idea this was shot.

    Well you NEVER mentioned you "thought that" and rejected it. And you NEVER mentioned anything about FKs and other dependencies. What is FKs and other dependencies which prevents this working solution? Tell us! Give us ALL the information.

    Wouldn't a trigger AFTER LINE capture the commit YVERT?  Or is after really not after validation?

    No - a trigger has NOT one commit. A trigger runs as a step in a transaction. Validation applies to the entire transaction. Until you, or Oracle, issues a commit, there is NO "committed SNA" to be stored as ORA_ROWSCN.

    You can easily see that for yourself. Create a simple table with dependencies of the line and then update two different sessions.

    create the table emp_scn rowdependencies in select * from emp where rownum<>

    Select empno, emp_scn ora_rowscn

    Update emp_scn set work = 'b' where empno = 7499

    commit;

    The first SELECT statement will show you that each row has the same SNA.

    EMPNO, ORA_ROWSCN

    7369,70622201

    7499,70622201

    7521,70622201

    Now, do the update (but no commit), then SELECT it

    EMPNO, ORA_ROWSCN

    7369,70622201

    7499,

    7521,70622201

    Where is the value of 7499? This session will NOT see a value for the changed lines in the current transaction. Other sessions will still see the old value.

    Now do the validation, then SELECT

    EMPNO, ORA_ROWSCN

    7369,70622201

    7499,70622301

    7521,70622201

    7499 now has a new and different value than the other lines. It will not be this new value until the validation occurs.

    Yes, row_dependencies would be the best way to go.  But mgmt doesn't recreate all tables for this.

    Well, you got the answer you want. You ask the best way. Now, you say that you were told the best way. But now you don't like the answer.

    How is it our fault? Your question has been answered wasn't she?

    Here are the facts:

    1 oracle creates a history of changes - the REDO log files

    2. you can use Log Miner to extract these changes

    3. you can create your own change log by adding a log file of MV to your table.

    4. you can then write a custom code to use this MV log file to determine which rows to "reproduce".

    So far reject you all THE POSSIBLE solutions.

    Accept it or change the requirements to allow one of the solutions proposed to be used.

    Personally, if I HAD to use a customized solution, I would use a MV journal to record the ROWID of the lines that have changed (for tables ROWID cannot be changed). I would then extract the appropriate lines by pulling on the lines corresponding to these row ID.

    Even that has problems since a line can be changed several times and children lines can also be amended several times - these questions FK you mentioned.

    I suggest you read this entire thread on AskTom a dozen years ago. It addresses ALL these issues.

    https://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:16998677475837

    Then in your next reply on this topic give us a summary of where some things with your question and what help you further expect.

  • Two quick questions (hopefully) - right way to dynamically change the CSS class and put of Splash screen implemented

    Couple of quick questions have left me speechless!

    So, it seems obvious that many JavaFX applications want to dynamically change the CSS styles.  Is the best way to do it through la.getStyleClass () .add ("classname") < node >?  The underlying data structure is a list of observable.  So let's say we have 5 styles that simply to change the fill color of a circle of 5 different colors, respectively.  So if I have a condition in which I want to dynamically apply 1 of these 5 styles, as I do now it's by setting all 5 styles as a string in a list by using a static initializer, then I call < node > .getStyleClass () .removeAll (list), then getStyleClass () .add ("classname").  I do this to avoid adding again and still the same style and inflate the underlying list.  What is the right way to manage dynamic CSS styles?

    Finally a very simple I think.  So I know there's a little differently to implement a splash screen.  My app has certainly got bigger in the last few months of development and I noticed there are about a 5 second delay between when I run the application when I see the main stage.  I was thinking what a splash screen would be nice to fill that time.  I had no time to prototype using a Preloader and I fear that using another, early stage start-up again would be too long of a delay.  "I actually thought that using the Nice and simple JVM argument" - splash: image name > "would be simple, easy and effective.  Unfortunately when I try to do, the splash screen appears but never goes away.  Anyone know what is happening with this?

    Your mechanism to manage the css style classes is a good approach; I've used several times. I wonder why the style classes have been implemented as a list, instead of a game, but there may be cases of good use for the use of a list.

    In some cases you can also consider using CSS PsuedoClasses, which were presented in JavaFX 8. Here is a little easier to use, especially if you have two options. But a use case might look like:

    public class Message {
        public enum Status { NORMAL, WARNING, CRITICAL }
    
        private final ObjectProperty status = new SimpleObjectProperty<>(Status.NORMAL);
        private final StringProperty message = new SimpleStringProperty();
    
        // constructor, getters, setters, and property accessors....
    }
    
    public Label createLabel(Message message) {
        PseudoClass warning = PseudoClass.getPseudoClass("warning");
        PseudoClass critical = PseudoClass.getPseudoClass("critical");
    
        Label label = new Label();
        label.textProperty().bind(message.messageProperty());
        message.statusProperty().addListener((obs, oldStatus, newStatus) -> {
            label.pseudoClassStateChanged(warning, newStatus == Message.Status.WARNING);
            label.pseudoClassStateChanged(critical, newStatus == Message.Status.CRITICAL);
        }
        return label ;
    }
    

    And then your css looks like

    .label:warning {
        -fx-text-fill: orange ;
    }
    .label:critical {
        -fx-text-fill: red ;
    }
    

Maybe you are looking for