something faster than the UNION ALL?

Hello

I have two tables, with 20% and 80% of a total Group of data.
The next time you press data, I need to have one top index so that the total dataset can be scanned.

The result of this update is an update of the two tables.

Here's my question (pls ignore syntax errors):

I could do something like:

create new_table
As select * from t1
UNION ALL
Select * from t2

change new_table add a primary key (acc_no)

and then
drop table t1
drop table t2

then the next cycle of treatment happens that, using new_table and a new set of entry, the t1 and t2 are filled (updates/inserts; and non-modifications/old)

Then, new new_table is generated by t1 and t2... with a new index.

This table is used again to read the next incoming batch of data, new filling t1 and t2...
etc etc.

actually, we have table t1 to send out of the database (flatfile). Then maybe we can do something faster as well. Maybe we don't need two tables at all?


QUESTION 1:
rather than generate a new table OF T2 T1 UNION ALL, I rather have the new table 'to be' the two tables? In this case, I just need to build the index on the table. Of course, t1 and t2 would disappear, but I have to drop them in any case for the next set of data.

QUESTION 2:
a little more advanced, is this table that combines all the results in the next 'as-is', must in fact be a table? I just need the appropriate fields (hm, in fact - all - fields) so I can make a new t1 and t2; There may be some smarter way to do it, without actually creating a new table t1 and t2 all the time...

a big thank you in advance, your help is greatly appreciated

Arne

Rustydud wrote:
Hi Dave Hemming.

two thoughts on this approach,
first of all I have not needed to keep the info on what were t1 and t2; they can be recessed. Rather the other way around, t1 + t2 will be "reborn" in the next run, based on the staging of new data and the "union all" table of the previous run (t1 + t2). then you see IS t1 + t2, after which t1/t2 would become useless.

No, I do not say that you will not regenerate the tables t1 and t2. There is only one only true table new_table. Everything you would do the table t1 that you do view t1 and it is done as if by magic to the underlying new_table. Even with t2 - there is an opinion, not a table.

The other approach is a view new_table which is a union of the tables t1 and t2, but then how do you index?

Tags: Database

Similar Questions

  • I can't get my computer in safe mode. The custom of menu f8 "Let me pick something other than the normal mode. My keyboard works perfectly fine (obviously since I could press f8), but it won't let me choose Safe mode.

    I can't get my computer in safe mode.  The custom of menu f8 "Let me pick something other than the normal mode.  My keyboard works perfectly fine (obviously since I could press f8), but it won't let me choose Safe mode.  I have a Trojan horse on my computer so I'll try to get it in safe mode.

    Hello

    Start - type in the search-> MSCONFIG box find top - make a right click on - RUN AS ADMIN

    Control - Section Boot - Safe Boot Startup tab and check the boxes below if necessary - APPLY / OK - REBOOT.

    ===========================================================

    It can be made repeatedly in Mode safe - F8 tap that you start, however you must also run them
    the Windows when you can.

    Download malwarebytes and scan with it, run MRT and add Prevx to be sure that he is gone. (If Rootkits run UnHackMe)

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN

    Malwarebytes - free
    http://www.Malwarebytes.org/

    Run the malware removal tool from Microsoft

    Start - type in the search box-> find MRT top - right on - click RUN AS ADMIN.

    You should get this tool and its updates via Windows updates - if necessary, you can download it here.

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN
    (Then run MRT as shown above.)

    Microsoft Malicious - 32-bit removal tool
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=AD724AE0-E72D-4F54-9AB3-75B8EB148356&displaylang=en

    Microsoft Malicious removal tool - 64 bit
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=585D2BDE-367F-495e-94E7-6349F4EFFC74&displaylang=en

    also install Prevx to be sure that it is all gone.

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN

    Prevx - Home - free - small, fast, exceptional CLOUD protection, working with other security programs. It comes
    a scan only, VERY EFFICIENT, if it finds something to come back here or use Google to see how to remove.
    http://www.prevx.com/   <-->
    http://info.prevx.com/downloadcsi.asp  <-->

    Choice of PCmag editor - Prevx-
    http://www.PCMag.com/Article2/0, 2817,2346862,00.asp

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

    If necessary here are some free online scanners to help the

    http://www.eset.com/onlinescan/

    http://www.Kaspersky.com/virusscanner

    Other tests free online
    http://www.Google.com/search?hl=en&source=HP&q=antivirus+free+online+scan&AQ=f&OQ=&AQI=G1

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

    Also do to the General corruption of cleaning and repair/replace damaged/missing system files.

    Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup

    Start - type this in the search box-> find COMMAND at the top and RIGHT CLICK – RUN AS ADMIN

    Enter this at the command prompt - sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    Run checkdisk - schedule it to run at the next startup, then apply OK then restart your way.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

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

    If we find Rootkits use this thread and other suggestions. (Run UnHackMe)

    http://social.answers.Microsoft.com/forums/en-us/InternetExplorer/thread/a8f665f0-C793-441A-a5b9-54b7e1e7a5a4/

    I hope this helps.

    Rob - bicycle - Mark Twain said it is good.

  • Why disable SuperFetch on ssd, if the RAM is much faster than the ssd?

    Directed by Microsoft that SuperFetch and PreFetch must be disabled, if the OS is installed on an ssd, in accordance with article http://support.microsoft.com/kb/2727880. But SuperFetch is used for loading the data components of applications, which were very often used for RAM. Although the ssd is faster that a hard drive is not faster than the RAM. So, I do not understand why Microsoft suggest disabling this feature. The only reason why I want to understand, it's because of a limited RAM. If the RAM is sufficient beyond 6 GB, if we disable SuperFetch, then the boot time and increase the loading time of most used applications. I miss something here?

    The other question is about PreFetch. I feel, maybe wrong, it does the same thing with SuperFetch, with one major difference. It loads all the information data on the ssd or hard drive, instead of the RAM, in order to accelerate the launch of applications and time when the OS is installed on a hard drive to boot. If I'm right, let's disable the PreFetch it stores information for one ssd or hdd, while SuperFetch stores data of RAM information, which is much faster and so it must be enabled if there is a sufficient RAM.

    I look forward to reading the notice of a Microsoft software engineer.

    Hi Leventis,

    Prefetch copies frequently accessed files together into a contiguous on the disk area so that they can be located and loaded more quickly. That it takes a lot of old drives to recover data faster.

    SuperFetch predict what applications you run next and preload all the necessary data in the memory. She has also done that with startup files. And for all the three days he sends a defragmentation command to the OS drive that will cause problems in the SSD drives.

    In traditional hard drives (HDD) data are scattered throughout the disk, so that the operating system for access, it will take more time. It is suggested to perform a disk defragmentation. But storage technology is different in SSD, where, it records the data dynamically and it recovers more quickly. Who will be low down the burden on the RAM and the RAM can be used for uses such as for the opening of the games graphics high-end, etc..

    Hope this information is useful.

  • Clean install of Windows a lot faster than the preinstalled system?

    My satallite comes with windows 64-bit installed.
    Since a lot of people suggested, here and elsehwere, a clean installation making consierably faster than the pre-installed windows (all bloated and unwanted software uninstalled with the uninstall program).

    Although fresh installtion was faster without drivers and programs, it has become more or less the same after installation of all software, etc. (perhaps a difference of 2 to 4% in the use of RAM) (over 4 GB)

    Is this normal or do others go much faster on any new install, for me, this effort has proved there is not a lot of use to do a clean install to drive retail.

    Ideas, wiers and feed back?

    See you soon

    Many pre-installed utilities are required for correct functionality and it can be a headache get these functions to work after installing a street copy of Windows.

    You will find that when you install Antivirus software on a street copy of Windows, it will happen similar to the pre-installed Windows installation. So if you want that the installation of Windows pre-installed perform better, uninstall the Antivirus should do the trick.

  • Is faster than the HP Mini 110 Microsoft Surface?

    My HP Mini 110 series netbook is SLOW and it is 2 years old and the Microsoft Surface seems newer, but I want to know if the Microsoft Surface would go faster (for example, loading programs and files, etc.)

    The HP Mini 110 has an Intel Atom processor and the Microsoft Surface has an ARM processor.

    The Microsoft Surface would be faster than the HP Mini 110?

    It must be such that it is a newer CPU, but until the Surface is in the hands of consumers, we do not have really the real world benchmarks. I am 100% sure that whatever that is released by Microsoft or others would show much faster and better in all aspects. But these are marketing people making conversation, not technicians running the real numbers.

  • My folders appear empty when I discovered by something other than the folder view.

    My folders appear empty when I discovered by something other than the folder view.  But in the folder, I can see and use files.  The search engine does not work.

    I use Windows 7 Home

    See if that helps,

    http://Windows.Microsoft.com/en-us/Windows7/advanced-tips-for-searching-in-Windows

  • Is faster than the local AIR IOS app remote SWF SWF because I can ' t use the unloading code.

    Are faster than the local SWF on AIR IOS app remote SWF because I can't use the code to unload on IOS of AIR.

    my local code:

    Stop();

    import flash.net.URLRequest;

    import flash.system.ApplicationDomain;

    import flash.system.LoaderContext;

    import flash.filesystem.File;

    import flash.filesystem.FileMode;

    import flash.filesystem.FileStream

    go_level_2.addEventListener (MouseEvent.Click, Level_2);

    function level_2(event:MouseEvent) {}

    var loader2:Loader = new Loader();

    var loaderContext2:LoaderContext = new LoaderContext (false, ApplicationDomain.currentDomain);

    var file2:File = File.applicationDirectory.resolvePath ("level2.swf");

    loader2. Load (new URLRequest (file2.url), loaderContext2);

    addChild (loader2);

    }

    Because it works for me, because I can't unload the SWF app file en becomes slow, I'll put the SWf file "s on a remote location.

    But I can't imagine what is happening when I loaded the SWF file remotely. It remains on the server, or it remains on my application when I unloaded it, and the app gets also larger. I hope you can help me because I went on the internet for a week and do not now how to go further.

    I had a similar problem, but not on iOS.

    Maybe my solution might work for you too, however.

    The problem was this line:

    new LoaderContext (false, ApplicationDomain.currentDomain);

    Do not reuse the same field of application, or you will never be able to get rid definitions and thus the SWF loaded.

    Instead, make a new child application domain for the current domain, keep track of it and it has as well as the rest of the SWF file when you are finished.

    Example:

    var loader2:Loader = new Loader();

    var appDomain2:ApplicationDomain = new ApplicationDomain (ApplicationDomain.currentDomain);

    var loaderContext2:LoaderContext = new LoaderContext (false, appDomain2);

    var file2:File = File.applicationDirectory.resolvePath ("level2.swf");

    loader2. Load (new URLRequest (file2.url), loaderContext2);

    addChild (loader2);

    Then

    function finishLevel2(event:Event):void

    {

    var loader2:Loader;

    loader2 = Event.Target.Loader;
    loader2.parent.removeChild (loader2);

    loader2.unloadAndStop ();

    appDomain2 = null;

    }

    Note that the definitions of the classes of the loaded SWF file will be available in the new application domain.

  • Why preview is rendered faster than the actual speed of my clips?

    When I create a new project, the overview of my project "plays" faster than the speed of the video. As it is fast forward. Each of the speed of clips are 100%.

    I tried to uninstall and reinstall the first but still have the same problem.

    Any idea? Thank you

    sample rate is 48 kHz

    Some people set their entry to 'none', but I do not see as to how that is going to change anything

  • R7000 Nighthawk Wired is faster than the wireless

    I currently use a Nighthawk R7000 and after the speed test internet using speedtest.net, I found that a desktop computer that is connected directly with ethernet is more than 100 Mbps faster than a wireless laptop which is the only room away from the router (wired office gets 140 ~-~ 160 Mbit/s, while the laptop is ~ 30-40 ~ Mbps). Any help would be great.

    Thanks to all who tried to help, but he had a friend IT of my father who came and said: it's a certain chip (or something of the kind) in my computer that was wrong, so we got a Linksys adapter Max - Stream AC600 WiFi Micro USB. I can now get 90 Mbits/s download. Thanks again for everyone's help.

  • Please help me with the Alternative of queries to replace the UNION ALL for two queries

    Hi all

    I have the query to retrieve assets employees salary count and in so far as below:

    Select ename, emp_no, sum (sal_till_2010), sum (sal_till_2014) of

    (select emp_no, ename, salary as sal_till_2010, 0 as sal_till_2014 of employee e1

    where effective_date < = 1 January 2010 ' and not exists (select 1 from e2 employee_deletion where e2.emp_no = e1.emp_no and e2.deletion_date < = January 1, 2010 "")

    UNION ALL

    Select ename, emp_no, 0 as sal_till_2010, salary as employee e1 sal_till_2014 - here is a dummy 0 salary until 2010 for the union of all the

    where effective_date < = 1 January 2014 "and not exists (select 1 from e2 employee_deletion where e2.emp_no = e1.emp_no and e2.deletion_date < = 1 January 2014") "

    Group of emp_no, ename;

    In this query, I get the total salary until 2010 and until 2014 in the employee table, dates are dynamically passed to the procedure, and this can change.

    But assume the date above and let me know the alternative of queries to improve performance because I use Union ALL and read the same table twice in the above query.

    Advice me with request to read the table once to fetch the same data as the above query.

    Thanks in advance.


    Hello

    Thanks for the display of the data of the sample; It's very useful!

    I think OP wants something like this:

    WITH cutoff_dates AS

    (

    SELECT TO_DATE (January 1, 2010 ', ' DD/MM/YYYY') AS cutoff_date, 2010 UNDER the label OF dual UNION ALL

    SELECT TO_DATE (1 January 2014 ', "DD/MM/YYYY"), double 2014

    )

    SELECT e.emp_no, e.ename

    , NVL (SUM (CASE WHEN c.label = 2010 THEN e.salary END), 0) AS sal_till_2010

    , NVL (SUM (CASE WHEN c.label = 2014 THEN e.salary END), 0) AS sal_till_2014

    E employee

    JOIN cutoff_dates c ON e.effective_date<=>

    WHERE DOES NOT EXIST)

    SELECT 1

    Of employee_deletion ed

    WHERE ed.emp_no = e.emp_no

    AND ed.deletion_date<=>

    )

    E.emp_no GROUP, e.ename

    ORDER BY e.emp_no

    ;

    Output of your sample data:

    EMP_NO ENAME SAL_TILL_2010 SAL_TILL_2014

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

    1 Mickey 450 0

    2 Donald 750 0

  • Component of the application defined by something other than the URL?

    Hello!

    Is it possible to filter or set a component application based on something else then the URL?  In order for me to express my question I will give a brief example of what we're trying to accomplish.

    I was asked to create Application components for 2 "organizations" that use a single Site.  For simplicity, this site is example.com.  I have the component of the overall application defined and I am metric gather for everything in the application.  These two organizations have access to this site using different URLS (a federated connection) and it's the only time that they hit different URLs.  It comes through the customer1.example.com/ and the other through customer2.example.com.  Once they connect then the two, they don't see example.com.  Client 2 is having terrible performance (according to them) and customer1 is having good performance and our overall number reflecting more closely the Customer1 is experienced, but we need a way to report only on client2. I spoke with the owner of the site and asked if it would be possible to modify their application works to include something in the URL that identifies the organization that uses the site, but they say they cannot do.  However, I can bring in added a cookie or something in the session to help me identify the organization that accesses the system.  Is it possible for me to make two different application components for these clients?  or can I somehow filter all out an application component that is not a particular witness?  Or y at - it another way to solve this use case?  Please let me know if a clarification is necessary.

    -Isaac

    I was able to find a solution to my problem.  Thanks for the suggestions, etc.  Creation of filters of the transaction did not exactly what I was looking for, and I was unable to get a list of subnets etc to split clients by.

    Finally, I learned that I could set up a 'Variable' on the FxM rule.  You can create a rule that will have the data of each shot, like a query, cookie, or fluctuating demand etc. and you can turn and it have to be part of the URL that is stored in the database of FxM.  Then, you can create an application component based on the converted URL.  This has quite amazingly and is exactly what my clients wanted.

    For example if there are several "customers (as in organizations)" who visit a unique site, and you have a cookie that contains a distinct value for each agency, then you can create a variable rule around this cookie and add the URL.  Here is an example.

    Let's say the cookie is

    customer_id

    and you have

    customer_id = 1

    customer_id = 2

    etc.

    Then you can have a Variable rule allowing such keys on the cookie name customer_id

    Simple as that when you create it then the success that pass through the FxM will start adding this cookie to the URL that is stored.  This does not affect FxV (it can if you select the check box).

    If you then configure a new component of the application, you can set up a regular expression like this:

    . * customer_id = 1. *

    Click on the test button and you will see a URL like this:

    Example.com / [customer_id = 1]

    Example.com/blahblah [customer_id = 1]

    Example.com/index/?foo=bar [customer_id = 1]

    Example.com/etc/etc [customer_id = 1]

    I hope that makes sense!  It worked really well for me, and I hope that someone else is trying to do something like that will be able to find it.

  • In addition to making video is the most powerful 60 d or faster than the 50 d.

    I have a 50 d is there one reason other than the ability to make the video to purchase a 60 d.

    Canon made a large step backward with the 60 d, I agree with other posters.

    The articulated screen is nice for video, but really not so valuable to the shooting yet. In fact, I consider the rebel T5i to be upper-middle to the 60 d and which is reflected in the price of these two bodies ($700 for a 60 d) and $850 for a T5i.  Don't 'upgrade' to the 60 d.  The next update of the 60 d is now the 7 d, which is a fine camera.

    Canon seems to work in three directions: creation less expensive cameras full frame (6 d vs 5DIII), the upgrade of the rebels as well as a transfer line which was the 40 d, 50 d to the 7 d product line.  I think the 60 d will be the last body "double-digit".  In fact, the EOS - M has the same internals as the T5i but in a small body.

    For everyone (except the 60 d

  • What can I do if the script runs faster than the network?

    I wrote a script between applications moving to InDesign, where he begins to AppleScript, to Photoshop, which AppleScript runs a JavaScript script to perform various tasks.

    It works beautifully on my laptop at home where I do my development. Yesterday, using me as a Guinea pig, I tried it in the office.

    On the third round, I was horrified to see the ExtendScript Toolkit pop up with an error message (about as welcome to see an AppleScript script, asking the user to open the Script Editor and fix a script).

    The error message was that app.bringToFront (); was not a valid function.

    This was the case in InDesign, which has a different activation function, and I realized that, even if my AppleScript called Photoshop activate, I was still in InDesign.

    The app.bringToFront JavaScript was so called because I had joined my code in the model of Tranberry.

    So I pressed the button stop on ExtendScript, returned to InDesign and represented the script. This time he worked as usual.

    Occasionally on our network we spend some time beachball - watch as a communication happens in the background. So I guess the time wherever the error was thrown was on one of these downturns in the network.

    The passage of InDesign, Photoshop is not happening pretty fast, but the script has run and has issued an order Photoshop JavaScript while I was still in InDesign.

    In AppleScript this unhappy communication with users can be avoided using blocks '... try error'.

    Is there an equivalent of the error handling in JavaScript that would allow me to avoid being tossed in the ExtendScript Toolkit and give them a friendly message to apologize, explaining what had happened and inviting them to try again?

    JavaScript has try/catch blocks

    try {}

    app.bringToFront ();

    } catch (e) {}

    error handling code

    }

    Or you might be able to use an if statement

    If (app == 'photoshop') {}

    app.bringToFront ();

    } else {}

    app handle not photoshop

    }

  • Pre-built SQLite Database faster than the construction of the tables?

    Hello.

    This time when running my application for the first time, about 12 SQLite tables are created programmatically, each containing anywhere from 7 to 45 fields. Timing of the launch of the app, a call to a web service also serves the database.

    I noticed that the table under construction seems quite slow, I don't know if it's just because the application runs for the first time and the device must perform some work of registry, or if the table of construction process is actually this takes time.

    From the time I click my app icon at a time that the user interface is displayed with actual data can last from 20 seconds to more than a minute, which is not good. Do I have to create a progress meter to indicate the user to be patient because the database tables will be created, or is it possible to include the database pre-built with my app? If so how would access (where he would be on the filesystem?).

    Thank you very much.

    "If the process of construction is in fact this long"

    That would be my bet.  Easy for you, but check with trace entries.

    "Can I create a progress indicator.

    You should have a flag indicating to the user that you are doing something at least, a kind of circular icon loading would be better than nothing.  If you it can match real progress or not depends on what you are tracking and how.

    "is there a way to include the database pre-built with my app"

    Yes - See the demo of SQL comes with your set of tools.

  • RAM being faster than the normal cache?

    Hi, I have an AMD FX 6300 with 8 GB of DDR3 RAM.
    generally, it will take about 3 days to be over before it starts caching all memory to free memory 0

    Now, after turning on my computer after about 40 minutes, he used all of the physical memory, so everything is new I load takes forever. I'm only under firefox and several games, the same thing I did. Nothing different. What is the Cause of this and how it stop eating my memory so fast? Help, please.
    See the image to the title of the physical memory usage... 'Free '.
    Normally, it would take 3 days before I have to restart, but even without loading any program I saw him up very fast

    JR

    In your second snip you 5721 'available. '  Free memory space is not relevant and not the cuase of your slow descent.  I suspect it's your IMVUCLient it uses currently ~ 675 MB.

    First of all I run malwarebytes and if that comes back clean run WPR.

    Please download the free version of Malwarebytes.
    Update immediately.
    Do a full scan of the system
    Let us know the results at the end.

    http://www.Malwarebytes.org/products

    In order to diagnose your problem, you will need to download and install below

    Install the WPT (windows Performance Toolkit)
    (If necessary) installation help is here
    When you have, open a command prompt and type the following command
    WPRUI.exe (which is the performance of windows recorder) and check the following boxes:

    First triage level (if available), CPU utilization, disk i/o.

    If your problem is not CPU or HD and then check the box/Member States concerned as well (for example, networking or register) configure your as in the snip below

    Click Start

    Let it run for 60 seconds or more, and save the file (it will show you where it is registered and to what is called the file)
    The file zip and upload it to us on Onedrive (or any file sharing service) and give us a link to it in your next post.

Maybe you are looking for