Can someone explain me that unexpected result with dbms_random ?

Hi There,
I wonder how executing dbms_random only once could return two different values?
select x,x from (select dbms_random.value(0,100) x from dual)
         X          X
62,6555943 31,0639443Thanks a lot for your feedback
Laurent

The optimizer the merged view into main query and called the function twice (whether or not it should be allowed to do this with non-deterministic function is another matter). Compare explain plan and results below with those with NO_MERGE or ROWNUM to prevent merging of the view.
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
SQL> SET AUTOTRACE ON EXPLAIN
SQL> /* Original */
SQL> SELECT x, x
  2  FROM (
  3    SELECT DBMS_RANDOM.VALUE (0, 100) x
  4    FROM   dual);
         X          X
89.1805061 93.2011152
Execution Plan
   0      SELECT STATEMENT Optimizer=CHOOSE
   1    0   TABLE ACCESS (FULL) OF 'DUAL'
SQL> /* With NO_MERGE hint in view */
SQL> SELECT x, x
  2  FROM (
  3    SELECT /*+ NO_MERGE */ DBMS_RANDOM.VALUE (0, 100) x
  4    FROM   dual);
         X          X
39.9149281 39.9149281
Execution Plan
   0      SELECT STATEMENT Optimizer=CHOOSE (Cost=17 Card=8168 Bytes=1
          06184)
   1    0   VIEW (Cost=17 Card=8168 Bytes=106184)
   2    1     TABLE ACCESS (FULL) OF 'DUAL' (Cost=17 Card=8168)
SQL> /* With ROWNUM in view */ 
SQL> SELECT x, x
  2  FROM (
  3    SELECT DBMS_RANDOM.VALUE (0, 100) x, ROWNUM
  4    FROM   dual);
         X          X
35.2401179 35.2401179
Execution Plan
   0      SELECT STATEMENT Optimizer=CHOOSE
   1    0   VIEW
   2    1     COUNT
   3    2       TABLE ACCESS (FULL) OF 'DUAL'
SQL>

Similar Messages

  • Can someone explain the more everything plan with edge up

    I have a share everything plan with 4 smartphones and 6 gig of data.  we are soon due for upgrades due to our 2 year contract being up.  I am starting to do some research and am confused on how the more everything plan with edge up works.
    questions
    1.  do we have to buy new phones to get the discounts offered by this plan?
    2.  will my company discount still work with the discounts of the edge up plan?
    3.  my 4th device is a year oir so from upgrade elegability do we need to wait or can we put that device on the edge up plan now?
    4.  if we upgrade to this more everything plan with edge up do we need to turn in our old phones?
    any help would be appreciated.

        Upgrading is always exciting, gbright! You can save up to $25 per line when upgrading with Edge. This does require you upgrading your device and accepting an Edge agreement. You will still qualify for your monthly employee discount off the More Everything access charges as long as the plan is $34.99 or higher. Each line has its own contract/edge agreement. You do not need to wait for the 4th line to be eligible to take advantage of Edge or the discounts. If you are eligible for the standard Edge, you do not need to trade in your current devices. You only trade in the devices when it is early edge. I can provide you more details in a private message.
    I just sent you a follow request. Please follow back and send me this information in a private message.
    Thank you,
    LenaA_VZW
    Follow us on Twitter @VZWSupport

  • Can someone explain why upgrading to PSE 12 resulted in two kinds of people tags?

    Can someone explain why upgrading to PSE 12 resulted in two kinds of people tags? One is the new Group tag (with its own two-person icon) and the other tag is the original People tag (one perswon silhouette icon) from previous version. If person already had been tagged the new People Group will not work. Anyone else having a problem or has found a solution?

    jlovettjr wrote:
    I would have no problem with using the new People tabs except for two things:
    1) There are pictures of people that facial recognition cannot handle. An example would be a profile view. These have already been tagged with old people tags. The new People Tab is dependent on facial recognition and will not accept these.
    I don't use facial recognition at all, sorry.
    2) The mystery is that the conversion from old to new was not automatic during the upgrade. Hours on telephone with Adobe tech did not resolve how one reconciled the two different tags. It appears to be more than a problem of naming the tags.
    As I explained, there was no conversion at all with my own categories, and I was too happy for that. From a number of other posts on that subject, I don't think that reconciling the two different kinds of tags is possible. I think I'll try a new conversion from an old PSE6 catalog so that I can play with the new scheme; that should work even without face tagging.

  • Can someone explain how to set up an administrator account so that I can have my phone and my daughters have separate apple ids?

    I mistakenly updated to the latest version of iOS and ever since then I can send messages to my daughter and I receive them but she does not.  She has an iphone also and her phone is under my apple id also.  Someone told me that I could set up an Administrator Account so that she can still be under my account but she has her own ID and that will fix the problem with text/imessages.  I can't find anything on the website that explains how to do that.  Can someone explain that to me?
    Thanks!

    I'm still not clear on what you are trying to accomplish. If you have an iPhone and she does as well you should have your own Apple IDs.
    If you want to pay for any purchases she makes with her phone as far as apps/music goes than that is what Family sharing is for.
    In my case my Wife and I are setup for family sharing. When she purchases music/apps it charges my credit card. This setup also allows me to share my past music/app purchases with her and vice versa.

  • I am getting cross border fee charges on my credit card that I believe to be assessed against my monthly fee, can someone explain?

    I am getting cross border fee charges on my credit card that I believe to be assessed against my monthly fee, can someone explain?

    This is an open forum, not Adobe support... you need Adobe staff to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"
    -or by telephone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

  • Please can someone explain how to delete email addresses?  I have people who when I type in their name it comes up with the correct email address but then when you hit return to confirm it promptly changes the name to someone else (always the same someone

    Please can someone explain how to delete and email address that when typed in brings up one name but when you hit return to confirm it jumps to another name.  I can't find them in my contacts list but they do come up when you type the first few letters of a name.
    EG If I type xyz and the name of the person comes up, when I press return to confirm that's the one I want then it jumps to [email protected],  always the same def address.
    I can't fathom it out.
    Thanks
    Terri

    Try this:
    Start a new email.  In the To address bar, type in xyz like you normally do, press return to confim, and when the address you want to remove shows up in the address bar, move your cursor over the address you want to delete.
    A small triangle next to the name will show up.  click on it, a drop down menu will open, click Remove from Previous Recipients List.  Then do the drop down menu again and Remove Address.
    Good luck.

  • CAN SOMEONE EXPLAIN ME THE DISPLAY QUALITY

    I have just purchased a new macbook pro 15" 2.4ghz. Im a designer, i havent even created my appleid, im on my sisters... i made a sacrifice to buy this $2700 laptop.
    and Im so dissapointed...
    I CANT SEE SMOOTH GRADIENTS.. all i see are ugly lines... i dont get it, for such a high class LAPTOP.
    Apple support please help me solve this. ive been reading forums about 6bit screens for this laptop.. i dont want to believe that. can someone explain? im returning this...

    I can verify that all of Apple's laptops use 18 bit (6 bits per Red, Green Blue) color, which is about 260,000 colors. The OS then using dithering to fake the missing colors. Despite what you have read, they are incapable of 24 bit 'millions of colors'.
    The problem with this argument is that, when it comes down to it, the color displays are made up of dithered red, green, and blue elements anyway. We accept that this form of display gives us "full color", so it's difficult to argue that millions of colors can't be represented using the same mechanism. It's not quite 16.7 million (more like 16.3 or something) but Apple's text has always taken care to read "millions of colors" rather than 16.7 million (which you'll still see on the specifications for the Cinema displays).
    Just for informational sakes though, these kinds of 6-bit displays don't rely on OS spatial dithering; they actually make use of their very fast switching to perform temporal dithering, switching a pixel between two shades very quickly to generate an in-between shade. That's why for most people the result is usually visually indistinguishable from true 8-bit color, and doesn't look like what you'd see with traditional dithering.
    If the OP is noticing severe banding on gradients, it's more likely to be an issue with color profiles than with the display being 6-bit.

  • Can someone explain the tables tab under function parameter declaration ?

    Hello,
    when declaring a function, part of its parameter interface is the tables tab. So if in FUNCTION1 i  declare a table: tdraw like draw  (optional)
    what does that mean ? does this mean that tdraw will be a table of type draw and at the same time it will be filled up with the same contents as draw has ?
    then how can other function (func2) use FUNCTION1 and its table ?
    so if inside func2  i also have an internal table AA like draw :
    so inside func2 i say:
    call function1
    tables:tdraw = AA
    does this mean that it will assign the result tdraw table of function1 to AA ?
    can someone explain details of internal tables and passing them as parameters ?
    and which table is assigned to which ?
    thank you

    Hi hassan,
    If you are talking about the tables parameter in SE37, when you declare a table tdraw like draw it only means you are declaring an internal table of type draw but the contents are not filled into it.
    In the source code of the program you have to write the code to fetch the data to tdraw and do the manipulations accordingly.
    Also, the tables you are declaring can be like the input table or can be used for output table.
    suppose u have 2 tables tab1 and tab2, tab1 you are going to input the values to it and the calculated values have to be in another table, you can use tab2 as the result table.
    hope it helps.
    award points if it helps.

  • Can someone explain shortest path switch over in Multicast?

    Can someone explain shortest path switch overin Multicast?

    Hi,
    Shortest path switchover is used in PIM Sparse mode.
    The concept of Sparse Mode is the multicast traffic should only be delivered when there are active receivers in the network. To accomplish this SM has explicit Join and Prune mechanism rather than Flood and Prune used by Dense mode.
    When the last hop router (where receiver is connected) receives an IGMP join message, it sends a PIM Join towards RP. This creates shared tree from the last hop router till RP along the routers.Thus a shared tree has been created from last hop router till RP.
    At the same time the above procedure was taking place, the first hop router (where source is connected) starts sending PIM Register messages to RP (when source starts sending multicast traffic). This register messages are unicast so that the intermediate routers will not aware of multicast traffic. When the RP receives Register messages from first hop rotuer, it does below checks after decapsulation:
    1. Are there any shared tree for the specific multicast group. If yes then send a SPT join towards first hop router so that the multicast traffic from source will be delivered to RP via native multicast rather than encapsualted packets. Also RP sends Register Stop message to inform first hop router to stop sending encapsulated multicast packets.
    2. When there are no active groups in RP (i.e RP has not received any PIM join for the multicast group from any last hop router), RP sends a Register Stop message.
    By this the traffic from source flows via SPT till RP. From RP it flows via shared tree till receiver. Everything is fine till now. But the drawback in SM is placement of RP and the load on it. Since RP is located in a central location chances are there that the multicast traffic from source takes a longer path to reach the receiver. This will result in increase in latency along with increase in RP load.
    So in those cases, it is desirable for the multicast traffic from source flows to receiver on optimal path. This is done by SPT switchover and this is done when the multicast group traffic crosses the SPT threshold configured. In Cisco the default SPT threshold is Zero kbps. So when the last hop router receives first multicast packet via shared tree, it does SPT switchover. This is done by sending a SPT Join towards the source thus bypassing the RP. Now the traffic from source prefers the most optimal path to reach the receiver.
    The same time, last hop router sends a PIM prune towards RP to inform it that it does not want multicast traffic over shared tree. This is done to avoid duplication of the multicast packets over SPT and shared tree.
    Few facts:
    1. Last hop router needs information about the source to send SPT Join and this can only happen when it receives few initial multicast packets via RP shared tree.
    2. If you do not want the last hop router to fall back to SPT switchover, then configure SPT threshold to infinity in last hop router.
    Sorry for the long post.
    HTH.
    thanks
    Arun
    Pls rate if it is helpful

  • I cannot find a way to sort the bookmark folders themselves alphabetically by name.I am not talking about in a view mode but in the way they are displayed when I click on my bookmarks tab. Can someone explain to me how to accomplish this.

    I have a lot of various book mark folders with websites contained within each folder. I am able to sort the websites within each folder alphabetically by name but I cannot find a way to sort the bookmark folders themselves alphabetically by name.I am not talking about in a view mode but in the way they are displayed when I click on my bookmarks tab. Can someone explain to me how to accomplish this other than manually dragging them as this is extremely hard for me due to the fact that I am a quadriplegic with limited hand movement dexterity

    Bookmark folders that you created are in the Bookmarks Menu folder. "Sort" that folder.
    http://kb.mozillazine.org/Sorting_bookmarks_alphabetically

  • Trying to understand RSTP - Please can someone explain this?

    Hi Group
    I am still confused about how RSTP is implemented. From what i understand the major difference is that STP
    used Timers for Loop prevention whereas RSTP coordinates between neighbors via messages (proposal/aggreement) to turn on links
    more quickly after topology changes and is "timer free".
    However, I have not noticed any difference in the configuration from the legacy STP
    configurations and the RSTP configuration on cisco devices. Or are there any differences??
    I have read in documentation that RSTP natively includes features like UplinkFast, BackboneFast and PortFast. So are these features now obsolete
    and not needed to be configured if you are running RSTP. (Although i have seen Portfast still configured along with RSTP on many switches)
    Also can someone explain the below Points from Cisco Documentation
    1) should STP be disabled on edge ports all together as suggested below?
    "STP edge ports are bridge ports that do not need STP enabled, where loop protection is not needed out
    of that port or an STP neighbor does not exist out of that port. For RSTP, it is important to disable STP
    on edge ports, which are typically front-side Ethernet ports, using the command bridge
    bridge-group-number spanning-disabled on the appropriate interface. If RSTP is not disabled on edge
    ports, convergence times will be excessive for packets traversing those ports."
    2) It seems RSTP relies on duplex setting to determine inter-switch links. What is the configuration to explicitly
    configure RSTP link types? (I couldnt find this in the documentation)
    "RSTP can only achieve rapid transition to the forwarding state on edge ports and on point-to-point links.
    The link type is automatically derived from the duplex mode of a port. A port that operates in fullduplex
    is assumed to be point-to-point, while a half-duplex port is considered as a shared port by
    default. This automatic link type setting can be overridden by explicit configuration. In switched
    networks today, most links operate in full-duplex mode and are treated as point-to-point links by RSTP.
    This makes them candidates for rapid transition to the forwarding state."
    Also i am a bit rough on my RSTP knowledge even after skimming a few Cisco documents. Can someone please explain this in simple way.
    Thanks in advance

    to configure it on a device:-
    spanning-tree mode rapid-pvst
    PortFast/UplinkFast & BackboneFast were cisco "Enhancements" to 802.1d STP. RSTP just incorperates them. If you want to configure portfast, the command is still "spanning-tree portfast"
    OK
    1) That is your choice - I have bitter experiance of users/IT admins just plugging hubs/switches in when ever they can. Also cabling the switch back to itself creating a cabled loop. So my advice to you is to leave STP enabled on all switch ports, BUT enable BPDUGuard - this is a life saver, if you have configured portfast.
    2) duplex auto! or duplex full (overiding)
    I really suggest that you read the 802.1d standard, once you understand normal spanning-tree - RSTP will come to you.
    http://www.cisco.com/en/US/tech/tk389/tk621/tsd_technology_support_protocol_home.html')">http://www.cisco.com/en/US/tech/tk389/tk621/tsd_technology_support_protocol_home.html')">http://www.cisco.com/en/US/tech/tk389/tk621/tsd_technology_support_protocol_home.html')">http://www.cisco.com/en/US/tech/tk389/tk621/tsd_technology_support_protocol_home.html
    http://en.wikipedia.org/wiki/Spanning_tree_protocol')">http://en.wikipedia.org/wiki/Spanning_tree_protocol')">http://en.wikipedia.org/wiki/Spanning_tree_protocol')">http://en.wikipedia.org/wiki/Spanning_tree_protocol
    HTH>

  • Can Someone Explain the order of things Using Swingworker?

    Hi:
    Can someone explain very clearly the order of things using Swingworker? Please do not refer the SUN tutorials. I am totally dead in the water with a very large application and the order of things is not sensible. Also, if the worker thread is too long, the GUI gets updated, but my progress bar (killed right after in the finished method) remains running in some instances only.
    Can someone explain any debugging methods for thread work?
    I am a veteran programmer of 19 years and this one's got me. The event dispatch thread returns immediate, the GUI responds well, but the progress bar setVisible(false); ... just after in the finished() method (on Event Dispatch thread) does not go away, continues running, only on very long (large query) work. I'm truly stumped. I have successful applications of the Swingworker use, the progress bar, and everything works fine. Not this one.
    Debugging threads is what I need. Or some tool that visually shows threads as the program runs.
    Thanks for any help,
    PiratePete

    Thanks. I guess I should count my blessings when using free stuff. But I have been impressed with what the J2SDK has to offer. I have been writing a complicated application that I am going to market and most of my problems have been "design" in nature.
    Thanks again,
    PiratePete

  • Can someone explain the hyperthreading settings in cmos (the 4x,5x, etc.)?

    Someone once said admitting you don't know something is the first step on the road to knowledge....or something like that 
    Can someone explain the hyperthreading setting in the CMOS Setup - mine is set to 5x, which I think is correct for my cpu - Venice 3500+, but I don't really know what it does.  What does that setting affect?  I think it was 4x by default, until I loaded optimal settings, and it went to 5x.....

    HT = Hyper Transport
    Q: What is HyperTransport™ technology?
    A: HyperTransport™ technology is a new high speed, high performance point-to-point link for interconnecting integrated circuits on a motherboard. It can be significantly faster than a PCI bus for an equivalent number of pins. HyperTransport was previously codenamed Lightning Data Transport, or LDT. HyperTransport technology was invented by AMD and perfected with the help of several partners throughout the industry. It is primarily targeted for the IT and Telecomm industries, but any application where high speed, low latency and scalability is necessary can potentially take advantage of HyperTransport technology. HyperTransport technology was invented in order to unleash the tremendous power of the AMD microprocessors. HyperTransport is planned to bring the computation experience to a  new level.
    Hyperthreading Technology used by Intel.

  • Can someone explain the code for having the Accordion panels closed?

    I located the answer to my own question (how to get all the accordion panels to remain closed when the browser opens) but I still don't understand the answer. Can someone explain this?
    This feature is only supported when using variable height panels, so you must pass a false into the Accordion's constructor for the "useFixedPanelHeights" constructor options, and a -1 for the "defaultPanel" option:
    <script type="test/javascript">
    var acc1 = new Spry.Widget.Accordion ("Acc1", { useFixPanelHeights: false, defaultPanel: -1});
    </script>
    Angela

    GPDMTR25 wrote:
    I located the answer to my own question (how to get all the accordion panels to remain closed when the browser opens) but I still don't understand the answer. Can someone explain this?
    This feature is only supported when using variable height panels, so you must pass a false into the Accordion's constructor for the "useFixedPanelHeights" constructor options, and a -1 for the "defaultPanel" option:
    <script type="test/javascript">
    var acc1 = new Spry.Widget.Accordion ("Acc1", { useFixPanelHeights: false, defaultPanel: -1});
    </script>
    Angela
    Hi Angela,
    You are right, the only way it will work is by setting the fixed height to false. As for the for the default panel option, -1 is not a panel and if you had 3 panels we could have used the number 3 (panel1 = 0) or 99 or whatever as long as there is no panel with that number. If we had used the number 1 for instance, then the 2nd panel would be opened by default.
    Hope this helps.
    Ben

  • Can someone explain what DHCP is and how I do I connect to WiFi  hotspot?

    Can someone explain how a wireless network/router with an internet connection allows computers with a wireless card to connect to the internet? For instance, In an internet cafe with WiFi, how does my macbook get the IP address for the ISP that the cafe uses to allow me to open a webpage with Safari? What is DHCP and how should I set my internet preferences to allow me to use a network other than my own.
    The reason I ask so many questions is that I can connect to the internet with my Airport Express base station network at home but not in my local WiFi cafe. Can see the network but not connect.

    Most Internet Cafes utilize DHCP to dynamically provide a wireless client with an IP address for that session. DHCP is a protocol used by networked computers (clients) to obtain IP addresses and other parameters such as the default gateway, subnet mask, and IP addresses of DNS servers from a DHCP server. It facilitates access to a network because these settings would otherwise have to be made manually for the client to participate in the network.
    You Mac's AirPort, in turn, is set up to be a DHCP client by default. This allows your Mac to accept the dynamically provided IP address information from the Internet Cafe's DHCP server.
    The reason I ask so many questions is that I can connect to the internet with my Airport Express base station network at home but not in my local WiFi cafe.
    It sounds like the AirPort settings that your Mac is using is no longer at their default settings...and my be the reason you cannot connect to the Internet at the Cafe...or, the Cafe has additional settings required. I suggest that you check with the Administrator of the particular Internet Cafe you're having trouble connecting with to find out what settings are necessary to use their wireless network.
    A typical AirPort is set up as follows:
    System Preferences > Network > Show > Network Port Configurations
    - Verify that AirPort is "On" (checked)
    - Verify that AirPort is at the top of the list. If it isn't, you can drag it to the top.
    Systems Preferences > Network > Show > AirPort
    AirPort tab
    - By default, join: Automatic
    TCP/IP tab
    - Configure IPv4: Using DHCP
    - Configure IPv6: Automatically or Off
    Proxies tab
    - Configure Proxies: Manually
    - Select a proxy server to configure: <All proxies should be unchecked unless you specifically require a proxy for Internet access.>
    - Exclude simple hostnames (unchecked)
    - Bypass proxy settings for these Hosts & Domains: <leave blank>
    - Use Passive FTP Mode (PASV) (checked)

Maybe you are looking for

  • How to find serial number without using macbook?

    What can be used to find serial number of my macbook outside of using my macbook? My computer was stolen and I do not have the box nor do I have it registered in iCloud, I know that iTunes holds my computer as an authorized user for my ID so I am sur

  • Reading String (Name-Value) from text file into XML

    Hi, I have a requirement for reading a text file and converting each entry of that text file into XML format. I have not came across such thing yet so looking for some ideas. I am using SQL Server 2005 and here is a sample entry from my source text f

  • Deselecting text in a text area as well as a input label?

    Hi there, Scenario - I have some text selected in a text area component. I get a callback from another program (external interface included) to remove the selection. How do i deselect the selected text and retain the text without selection? I have re

  • Delta Loads for 2lis_02_scl and 2lis_02_itm

    Hi Experts, I am facing an issue, After initializing the setup tables and doing the init load for 2lis_02_scl and 2lis_02_itm whenever I do the delta loading for these two, all the dataload finish with green status and extracting 0 from 0 records. I

  • Use Get-ADUser to get locked status and if locke give a choice to unlock it.

    Hi guys and girls, Im startling to learn powershell scripting and have made my first tool/Script. Below script is the one i use, however i do have an problem i would like some help with. I use the script to display some basic info and also to show if