Regexp_replace - too heavy?

I've got code for extracting numbers from varchar2 column:
with t1 as (
select 1 as acode, '100,00' as avalue from dual union all
select 2 as acode, '100.00' as avalue from dual union all
select 3 as acode, '100.00%' as avalue from dual union all
select 4 as acode, '100.00perc' as avalue from dual
select acode, nvl(abs(regexp_replace(replace(avalue,',','.'),'[^1,2,3,4,5,6,7,8,9,0,.,]')),0) as avalue
from t1After few weeks of using we received complain, the Customer said that "sometimes" the procedure works too long. He said, it always works about two minutes, but "sometimes" it can work more than 24 hours! He investigated the issue and decided that the problem is regexp_replace (it's too heavy).
Could you please:
1) explain to me is it true that regexp_replace is too heavy
2) give me solution how do I receive the same result without regexp_replace.
Actually, I'm not trying to prove that regexp_replace is normal. It's a pity, but I can't discuss the issue with the Customer. I'm just trying to understand details for myself.

with t1 as (
select 1 as acode, '100,00' as avalue from dual union all
select 2 as acode, '100.00' as avalue from dual union all
select 3 as acode, '100.00%' as avalue from dual union all
select 4 as acode, '100.00perc' as avalue from dual
select  acode,
        nvl(
            to_number(
                      regexp_replace(
                                     avalue,
                                     '^[^.,0-9]*(\d*)(\.|,){0,1}(\d*).*$',
                                     '\1.\3'
            0
           ) avalue
  from t1
     ACODE      AVALUE
         1         100
         2         100
         3         100
         4         100
SQL> And with TRANSLATE:
with t1 as (
select 1 as acode, '100,00' as avalue from dual union all
select 2 as acode, '100.00' as avalue from dual union all
select 3 as acode, '100.00%' as avalue from dual union all
select 4 as acode, '100.00perc' as avalue from dual
select  acode,
        nvl(
            to_number(
                      translate(
                                replace(
                                        avalue,
                                '0' || translate(
                                                 avalue,
                                                 'A0123456789.,',
                                                 'A'
                                '0'
            0
           ) avalue
  from t1
     ACODE      AVALUE
         1         100
         2         100
         3         100
         4         100
SQL> SY.

Similar Messages

  • HT4972 i have an iphone 4 with ios 5.1.1 and i want to upgrade it to the latest ios 6 and not 7 because its too heavy for iphone 4 how can i do it

    i have an iphone 4 with ios 5.1.1 and i want to upgrade it to the latest ios 6 and not 7 because its too heavy for iphone 4 how can i do it?

    You cannot. When you upgrade, you will get the latest version of iOS 7.

  • Images too heavy

    The images on my iweb site are too heavy and are making the site slow. Does anyone know of a trick to resolve this without resizing, reframing and remasking all of the images?

    Gideon ~ Welcome to the Support Communities. This Apple doc may help:
    iWeb '08 Help — Reducing a photo’s file size
    ...Found by searching here:
    http://support.apple.com/kb/index?page=search

  • Fonts Look Too Heavy In Safari

    After installing Lion the way fonts display in Safari especially where they are bold are now too heavy which is closer to how they display on Safari in Windows. This is overdone as they looked better before.

    Actually they are fine now as I hadn't seen that Use LCD font smoothing had been turned on. Now off and back as before.

  • Volcano 7+ too heavy?

    i have the kt3 ultra aru
    is the volcano 7+ with the 3 lug clip too heavy?
    what do you guys think?

    I have the Volcano 7+ on my KT4VL. I was a bit concerned with the size and weight of the hs. Works great! Dropped the CPU temp by 14 degrees C!
    Make sure you remove the MB to install the HS. Use a good silver grease. Use a nut driver, not a screw driver to push down the HS clip onto the processor socket. Less likly to slip and destroy your MB.  

  • Videos too heavy after conversion (Zen V Pl

    Hi everybody. I bought a MP3 Player Zen V plus. My problem is that I have to convert the videos before to put them on the MP3 Player. But after conversion, the videos become too heavy, so that I can't by example put a divx movie on the player (If a divx movie is 600 mo before conversion, he is 2 go after conversion.)Can anyone help me ?Thanks. PS : Sorry if my english is bad, I am french and that's difficult for me.

    Sorry, I should have included an English version as well.....it basically says try PocketDivx (my preference) or SuperC. I forgot the Zen V Plus uses a uncompressed AVI....the direct copy?option within PocketDivx may work....may not. ---------------- - As HHS points out, the Zen V Plus uses a uncompressed AVI format. If you try PocketDivx, in the advance options, there is a option to direct copy the video and audio stream...this may work. Comme HHS fait remarquer, le V zen Plus utilise un format de AVI sans compression. Si vous essayez PocketDivx, dans les options d'avance, il y a une option pour diriger la copie le vid?o et le ruisseau audio. ..this peut travailler.Message Edited by Locknar on 04-20-200707:4 PM

  • Videos too heavy (Zen V Pl

    Hi everybody. I bought a MP3 Player Zen V plus. My problem is that I have to convert the videos before to put them on the MP3 Player. But after conversion, the videos become too heavy, so that I can't by example put a divx movie on the player (If a divx movie is 600 mo before conversion, he is 2 go after conversion.)Can anyone help me ?Thanks. PS : Sorry if my english is bad, I am french and that's difficult for me.

    Sorry, I should have included an English version as well.....it basically says try PocketDivx (my preference) or SuperC. I forgot the Zen V Plus uses a uncompressed AVI....the direct copy?option within PocketDivx may work....may not. ---------------- - As HHS points out, the Zen V Plus uses a uncompressed AVI format. If you try PocketDivx, in the advance options, there is a option to direct copy the video and audio stream...this may work. Comme HHS fait remarquer, le V zen Plus utilise un format de AVI sans compression. Si vous essayez PocketDivx, dans les options d'avance, il y a une option pour diriger la copie le vid?o et le ruisseau audio. ..this peut travailler.Message Edited by Locknar on 04-20-200707:4 PM

  • Too heavy photos

    i want to email come photos but they are too heavy over 2 MB and I can't sent them...

    You have a couple of options, if you're using Apple's Mail program:
    - If you click the Email button, iPhoto asks you what size you want to email, and if you pick a smaller size the file sizes will be smaller
    - If you start an email message and drop the photos into it, Mail has a small menu at the bottom of the window where you can choose Actual size or three other sizes. The file size gets reduced according to what you pick.
    The first option works for other recognized email clients like Entourage too.
    If you're using a web-based email program, choose Export from the File menu, pick a size to restrict to, and export the pictures to the desktop. From your web email, navigate to this folder and enclose the pictures within. Be sure that the .jpg extension is still on the photos when you export.

  • The ink is too heavy and too wet on the photos.

    The printer is an HP PHotosmart C8180.  I am using HP advanced photo paper and HP ink.  I have cleaned the printhead twice and all ink levels are good.  Photos printed two days ago were good.  I have the settings on 4x6 boarderless, the paper type HP advanced photo paper.  Would really appreciate some help.  Thanks

    Hello GirlK,
    Welcome to the HP Forums.
    I see that you are having an issue with the ink being too heavy or still wet on the photos.
    Here is a document that deals with the issues you are having as well as a few extra steps.  Please click the following link on
    Ink Smears or Is Sticky on Printed Photo.
    If the troubleshooting does not help resolve your issue, I would then suggest calling HP's Technical Support to see about further options for you. If you are calling within North America, the number is 1-800-474-6836 and for all other regions, click here: click here.
    Thanks for your time.
    Cheers,  
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • Def Tech 1000 too heavy for mount

    I just got around to hanging my 2 front speakers (Definitive Technology 1000s) and it seems as though they are too heavy for the mounts I bought (Def Tech Pro Mount 80). The speakers fall forward. Has anyone else run into this problem? Any suggestions? Thanks very much.

    Hey Prince,
    I double-checked with Definitive Technology’s website, but it doesn’t appear that the ProMount 80 was designed to support ProMonitor 1000 speakers. In fact, the only accessory that was listed as being compatible was the ProStand 100/200/1000. For additional information though you may want to give Definitive Technology a call at 1-(800)-228-7148. A support rep should be able to provide you some basic troubleshooting support, as well as confirm whether or not you purchased the correct wall mount.
    Hope this helps you out.
    Aaron|Social Media Specialist | Best Buy® Corporate
     Private Message

  • New iPad is too heavy...

    Too heavy to be carried for longer period...T.T

    You can put it on the table
    http://i1224.photobucket.com/albums/ee374/Diavonex/6074c00d.jpg

  • How to add a gif (animation) file to stage without making the SWF too heavy?

    Hello
    I'd like to make some simple flash animation using some gif files i have on my pc. these gif files have like 20-30 frames each . eventually when i export the file to SWF it becomes too heavy (more than 1mb) ...what can i do to avoid this? i need the swf flash files to be much smaller so i can upload them to my site without making my site upload time too slow.
    thanks in advance

    Without seeing your movie, I'm guessing that the best place to shave off some of the size would be to make the individual images used for the animations as small as possible. This could be done through a combination of optimizing the individual images and reducing the physical size of the images.
    Another tactic is to make individual Flash movies out of each animation, then make a master Flash movie that will load in each of these individual movies at runtime. This will lower the initial wait for a large file download. The success of this tactic will rely on size of the files to be downloaded and the connection speed of your users.

  • Signature in PDF appears too heavy (line weight)

    Hello,
    I have excel documents which need to have an actual signature. I have scanned in my signature and have it as a TIF file amongst others. I have the full Adobe CS3 suite so I have cleaned up the sig in PS and saved it in various formats.
    When I import the picture file into excel the signature looks and prints fine, but as soon as I create a PDF the line weight on the signature becomes extremely heavy and it looks awful, both on-screen and printed.
    I have used the Save For Web & Devices option to create a transparent GIF from the TIF file and this also results in extremely thick line weights in the PDF only.
    If I simply copy and paste the signature in from PS or AI, the line weight is fine both pre/post PDF, however the background is no longer transparent.
    I have tried searching for this issue in the forums with no luck so if the answer lies under a topic I have missed I would appreciate being redirected there.
    Thanks,
    Dave

    Hi Mike,
    I need the signature to sign off on data that is sent to our clients.
    As an update...
    We have a couple of tablet PCs here so I have created my signature using one of these. I now have a crisp/clean image of my signature which I have saved as an EPS file. It looks great both pre/post PDF creation.
    Attaching the image to a digital signature is definitely something I am going to explore.
    I am still curious as to why distilling the scanned signature yields the ultra fat line weights.
    Thanks,
    Dave

  • AE is too heavy and how make it 'light'

    hello guuysssss!
    im working right now and im a some clip with a bunch of layers and each layer has a large size. im mad because everytime i tried to preview my clip it takes many times because is so heavy. how do i make this stuff more light for preview? what are the settings? just when im doing my work. and when it finished, just turn back all those settings so my clip not getting worse as im work with.. like maya. when we modeling, maya is so light for modeling. eventough we bulid many polygons. but when rendering, it takes so many times. im want to do the same way as maya in after effect. can i possible to do that?
    my computer specs:
    Macintosh 10.7 (a.k.a Lion)
    Intel core i3 3.06ghz
    4GB of RAM DDR3

    Samuel,
    See this page for information about memory and improving performance in After Effects.
    See this page for resources about making After Effects (and Premiere Pro) work faster.
    Regarding your specific question about proxies, see this video.
    As stated, 4GB is a terribly small amount of RAM for using After Effects. You say that you don't know how to add more RAM, but know that this is going to be a limitation in having After Effects work as smoothly as you may like. You'll need to pay special attention to the various techniques for improving performance to minimize the amount of RAM needed.

  • Stylus & Atmosphere too heavy?

    Hi,
    recently added Stylus and Atmosphere (which are great!, expecially Stylus) to my Logic's plugins.
    Now, using both of them into a Song, Logic goes weird. Sometimes the standard pop-up warning appears ("Core Audio System Overload - Disk too slow", or something like that...). Other times, Atmoshpere behaves like 'stalled'. And I'm not able to load any sound or to move any virtual button. I have to close and reopen it, when I'm lucky. Or to quit Logic and reload it, when I'm not.
    It doesn't look to me they take too much memory or power from the cpu, and I'm workin' on iMac G5 1,8 Ghz, with 1G ram and 160 hd space. A friend of mine run the same plugins together in Logic on a very less powerful machine, but he does not experience the same problem.
    So, does anyone know where the issue is, and how can I optimize my set-up?
    Thank you in advance,
    cheers,
    franz
    Powerbook G4, 1 Ghz - iMac G5, 1,8 Ghz   Mac OS X (10.4.7)  

    You have a couple of options, if you're using Apple's Mail program:
    - If you click the Email button, iPhoto asks you what size you want to email, and if you pick a smaller size the file sizes will be smaller
    - If you start an email message and drop the photos into it, Mail has a small menu at the bottom of the window where you can choose Actual size or three other sizes. The file size gets reduced according to what you pick.
    The first option works for other recognized email clients like Entourage too.
    If you're using a web-based email program, choose Export from the File menu, pick a size to restrict to, and export the pictures to the desktop. From your web email, navigate to this folder and enclose the pictures within. Be sure that the .jpg extension is still on the photos when you export.

Maybe you are looking for