How does Index fragmentation and statistics affect the sql query performance

Hi,
How does Index fragmentation and statistics affect the sql query performance
Thanks
Shashikala
Shashikala

How does Index fragmentation and statistics affect the sql query performance
Very simple answer, outdated statistics will lead optimizer to create bad plans which in turn will require more resources and this will impact performance. If index is fragmented ( mainly clustered index,holds true for Non clustred as well) time spent in finding
the value will be more as query would have to search fragmented index to look for data, additional spaces will increase search time.
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
My TechNet Wiki Articles

Similar Messages

  • OnChange() event how does it work and what is the syntax

    hi,
    i have a field (County) on a form in a jsp page that needs to get all its values from the database and present it to the user also i have another field (year) this also needs to get all its values as a drop down from the database.
    i dont have any lib tag available to use and can't afford the time to set this up. so just have to script in jsp or use beans in jsp.
    my question is 2fold
    Q1. - i was thinking of having a DataAccess (dA) object to run a sql to select * distict couties ...
    also have another query in DataAccess select * Distinct year....
    and in the jsp instantiate the (dA) and iterate through and fill the select drop down box - how to code this syntax i'm not sure and if this is the correct approach or the only approach would appreciate some sample code that i can mess around with thanks.
    - is above approach best way of doing this. - also taking into account Q2.
    Q2 - when the user selects county then i need to fire a onChange event - probably using javascript but not sure how this works - bascially i need to then update the year drop down according to the below sql-
    again how is this possible - and is this the best approach or will it be too many calls to the database - especially consdering that the forms are all part of a search tool.
    SELECT     DISTINCT     v.year
    FROM          v_volumes     v
    WHERE          v.county     = <the selected county>
    OR          (v.county_reference     =
                   (SELECT     ca.county_reference
                    FROM          county_aliases     ca
                    ,          counties     c
                    WHERE     ca.county_reference_also_called     = c.county_reference
                    AND          c.county     = <the selected county>)
    ORDER BY v.year

    Sorry to rain on your parade, but its not going to be quite that simple.
    Populating a second dropdown depending on the first one, has been discussed quite in depth on this forum, I suggest you do a search to look at older posts.
    Javascript code cannot call java/database code from an onclick event.
    The best it can do is trigger a form submission, which reloads the page
    running any java/sql code that displaying the page entails.
    So onlick event on the first dropdown triggers a form submit, which loads the page with the correct values in the second dropdown.
    con: requires a page request
    The other approach is to download ALL possible values to the jsp page, and have javascript handle the swapping of values.
    pro: no page refresh needed
    con: must have all data available on the page. javascript is a bit more complicated.
    Hope this helps,
    evnafets

  • Using a PCI-6534 card, how does one write and read from the board simultaneously after being triggered on the StartTrig input ?

    I've copied two NI-developed VI's into a single VI. The first VI is the LV 'Buffered Pattern Input-Trig VI' under examples/daq/digital/653x. Using an external data generator, I send it a pulse on StartTrig, a clock on REQ1 and data on DIOA0. The start pulse is negative going so I set the front panel input to trigger on "falling edge" with clock set to 'external'. This VI is configured as Port 0 and Group 0. Once this VI is triggered I need to then start another VI which is simply the Buffered Pattern Output VI that also ships with LV. This VI is configured on Port 2, Group 1. This VI is used to simply send out a previously d
    efined array of data on DIO C0, C1 and C2.
    So, I receive a Start Trig, then clock in data, and then immediatly want to send out data. My problem is that I can't figure out when my receiving VI gets triggered on the StartTrig input. If I know when the trigger occurs, then I can wire this condition to a case statement and activate the second, or write VI. Without having the Trigger condition be met to enable the output VI, the problem is that it always outputs without even be triggered. So, where or how do I tap to find out when the StartTrig happens ? In other words, how do I know when the receiving VI has received a StartTrig pulse. There's got to be a way to do this, and I need to run in continious mode, so I can keep receiving and sending out data over and over again. Any ideas ? If your answer is to look at the examples, please tell me exact and specific examples, because I have not been able to find any examples directly related to my goal. thanks.
    Kirk

    Nestor-
    I tried your first suggestion of connecting ACK1 to ACK2. But, I get Error 10010 at Digital Buffer Control when I run the VI. I've added an array of 32 ones and zeros to the output VI so that I have some data to write. What's really interesting is when I have a scope probe on ACK1 and ACK2 which are now common, the voltage level is less than 5 volts, around 4.7, but there is something wrong with the signal, a few spikes, I've seen this before, like 2 signals are trying to drive the same output or something. When I remove the connection between ACK1 and ACK2 the signal looks perfect since ACK1 is being driven by my data generator. This leads me to believe that you can't connect ACK1 to ACK2, or atleast you can't do it with the way I have the VI'
    s configured. Also, I have a scope probe monitoring DIOC0 (since I'm writing to Port 2,which is Port C) and I don't see any data coming out, which makes sense since I get the error mentioned above.
    In terms of my configuration, I have 2 VI's on the block diagram. I have Buffered Pattern Input-Trig.VI with the following settings:
    Group: 0
    Device: 1
    Port List: 0
    Buffer Size: 1000
    Clk Soruce: External
    Trigger Type: Start Trigger
    Trigger Condition: Trigger off Falling Edge
    # of pretrigger points: 0
    For the 'writing VI' I copied the Buffered Pattern output-Trig.VI with the following setup:
    Device: 1
    Group: 1
    Port List: 2
    #of updates: 1000
    Clock Source: Internal
    Trigger Condition: Trigger on falling edge
    So, do you have any ideas on what might be wrong ? Just realized that I can attach files, so my VI is attached.
    thanks.
    Kirk
    Attachments:
    input_output_at_the_same_time.vi ‏164 KB

  • How does changing an internet provider affect the wireless network

    If I have a wireless network set up with the Linksys E1000 using one internet provider and then change the internet provider service to someone else, do I have to reset up the network or is it simply a matter of connecting the new internet service to the router?

    It affects your network setting, I changed the provider, now is AT&T, they "don't support 3rd party routers".
    I followed their instructions to change their modem settings to "bridge", the router still doesn't work, have turned off modem and router, still doesn't work.
    Had to return to the other modem since I have not disconnected it yet.
    Already checked that the IP address of the computer and new modem are similar as recommeded by AT& T, still can't make things work.Frustrating !!

  • My iPhone was stolen and I have contacted the police who are using the meid number to locate.  How does this work and what are my chances of getting the phone back?

    My iPhone was stolen.  I used Find My iPhone app to lock it and display a message.  The phone has not connected to the internet to locate it.  I contacted the police and they have taken my meid number.  How does this work and what are my chances of getting the phone back?  Are there other ways the theif can use it.  I was told once they put in a new sim card and use it, whatever software the police have, it will show up.

    Honestly? In the US (I can't speak to other countries, though I doubt it works much differently in a lot of the world) The police took your report and filed it either in their computers or, on paper. They will now not think of this again. The only time it will cross anyones mind is if, in the course of entering information into evidence about items recovered or seized at a crime scene, the serial number of an iPhone that was found/seized happens to match yours, in which case you will be contacted.
    The police in the US can and will do nothing to 'blok' the phone and it's not worth their time to try and locate it unless you know for a fact that it was stolen by a big time drug lord, master criminal, or some other such prime target and they can get a court order to track the location of the phone in order to locate this individual for your own purposes.  If they do that, they'll probably keep him under surveilance for a year or so before they act.
    Basically, the police don't care about your phone. If they find it, they will give it back to you. They are not, however, going to go looking for it. They have better things to do.
    I'm sorry, but that's the way it is.

  • I was using my notes earlier today and now for some reason they are all gone. How does this happen and is there anything I can do to get them back, the new ones also that haven't been synced.

    I was using my notes earlier today and now for some reason they are all gone. How does this happen and is there anything I can do to get them back, the new ones also that haven't been synced.

    See Recover your iTunes library from your iPod or iOS device.
    tt2

  • I'm having problems with iPhoto and the facebook set-up.  Every time I attempt to do so it says an error has occured and try again later.  I have not seen a solution posted.  Therefore, how does one contact Apple to solve the problem?  I'm new to the worl

    I'm having problems with iPhoto and the facebook set-up.  Every time I attempt to do so it says an error has occured and try again later.  I have not seen a solution posted.  Therefore, how does one contact Apple to solve the problem?  I'm new to the world of iMac but I find it a bit frustrating trying to solve basic issues/problems:(

    For what it's worth, you posted this in 2011, and here in 2014 I am still having this same issue. Over the last two days, I have had to unlock my apple account 8 times. I didn't get any new devices. I haven't initiated a password reset. I didn't forget my password. I set up two factor authentication and have been able to do the unlocking with the key and using a code sent to one of my devices. 
    That all works.
    It's this having to unlock my account every time I go to use any of my devices. And I have many: iMac, iPad, iPad2, iPad mini, iPhone 5s, iPod touch (daughter), and my old iPhone 4 being used as an ipod touch now.  They are all synced, and all was working just fine.
    I have initiated an incident with Apple (again) but I know they are just going to suggest I change my Apple ID. It's a simple one, and one that I am sure others think is theirs. I don't want to change it. I shouldn't have to. Apple should be able to tell me who is trying to use it, or at least from where.
    Thanks for listening,
    Melissa

  • In the new Pages, how does one send an image to the background (and make it selectable)?

    How does one send an image to the background in the new Pages and how does one make it selectable?

    Also why don't TEXT to Speech short cuts established in system preferences work in the new Pages?
    I am confused (and not completely happy)

  • With PS 7  create new  Place two objects on the new file  then you may cut copy and paste Cs2  create new  place two object on the new file Cut is not available how does one cut and paste in new file

    With PS 7
    create new
    Place two objects on the new file
    then you may cut copy and paste
    Cs2
    create new
    place two object on the new file
    Cut is not available how does one cut and paste in new file

    If your using File>Place then photoshop cs2 creates what's known as Smart Objects, which photoshop 7 didn't have.
    In photoshop cs2 you can rasterize the smart objects and that should make the Cut function available.
    Select both placed layers, right click on the area to the right of the tumbnail and select Rasterize Layers.
    If in photoshop cs2 you to Help>Photoshop Help and look under Layers>Smart Objects, that should give you a good overview of what smart objects are.

  • How does c:url tag know when the session is cookieless and thus to redirect

    i have been looking at the source code for c:url tag and can't figure out how they are doing that. I need a way to do that in a jsp, to check if the cookies are allowed or not.

    how does c:url tag know when the session is cookieless and thus to redirecthuh?
    What do cookies have to do with redirecting?
    Cookies get encoded into a URL using the method in HttpServletResponse: response.encodeURL() or encodeRedirectURL().
    That method determines whether or not it prints out the session id as part of the url, or it gets uses cookies.
    You can try: request.isRequestedSessionIdFromCookie().
    If that is true, you know that session cookies are supported (or at least that one was)

  • How does APEX create and save new files. What extension does it save in?

    Hi can someone help me with this question?
    How does APEX create and save new files. What extension does it save in?
    Cheers!
    VJ

    It's really too bad we can't see VJ's face when the concept sinks in. This is one of my favorite moments when teaching APEX classes. Most people love it, some people don't. If nothing else it really proves the power and performance of the Oracle database. Each page view can generate 40+ queries, yet on the average system this takes less than .04 seconds.
    Keep in mind there are no undocumented features or "Oracle Internals" that the APEX team uses to achieve this performance, just sound database design. With every feature they add they evaluate how it will be used and design the tables and indexes to most efficiently answer the query. Sometimes this means going against "purist" normalized principals.

  • Using family sharing, how does one view and download songs from a family member's collection in itunes?

    Using family sharing, how does one view and download songs from a family member's collection in itunes?

    When you click on your device you are presented with the pages
    Summary
    Info
    Apps
    Tones
    Music
    Movies
    TV shows
    Books
    Photos
    To remove Audiobooks depending on the type of Audiobook ie a series of mp3 files you will find under music and probably have to deselect the album name to remove it. I don't have any of these as I download from Audible or I use Audiobook Builder to stictch together mp3 files into m4b files. To find these Click on Books you will immediately see a section for books (in reality ebooks). Scroll down past that and you will see Audiobooks where you can select and deselect. Deselect the required Audiobooks and Click Sync

  • In Mac Mail on OS 10.5.8 I am receiving bogus emails which claim to be sent by people in my address book, but actually are not.  How does this happen and how can I correct this problem

    n Mac Mail on OS 10.5.8 I am receiving bogus emails which claim to be sent by people in my address book, but actually are not.  How does this happen and how can I correct this problem

    You said:
    I am receiving bogus emails which claim to be sent by people in my address book, but actually are not.
    ...and:
    Are you saying that my address book has not been hacked into?  That others are getting these email addresses from another source?
    This confuses me.  Are you saying that you are receiving bogus e-mails from some of your contacts, or are you saying that they are receiving bogus e-mails from you?
    If the latter, there are a number of reasons that people might be getting e-mail from you.  Malware, though technically possible, is extremely unlikely.  See Someone is sending messages from my e-mail address!
    If the former, that's rather unusual.  The only decent explanation I can think of is that a bunch of your Windows-using contacts got infected with something and their machines are being used to spam everyone in their contact lists, which would include you.

  • How does my Iphone and Nike + work?

    Hi there,
    i'm using for a week the Nike+ sensor, but i've asked myself how does they communicate and i doesn't know.
    Maybe you know the answer, please let me know?

    http://manuals.info.apple.com/en_US/Nike_Plus_iPod_User_Guide.pdf

  • TS4391 Does anyone know if this affects the Nik software plugins?

    Apple says Aperture 3.4 is not compatible with some third-party plug ins. Does anyone know if this affects the Nik plugins?

    I had the same question and asked NIK software support. Their reply was they are seeing no problems with Aperture 3.4. I subsequently upgraded to 3.4 without any problems and verified the NIK plug-ins work as they did before.
    Note that NIK updated all their plugins on 13 Sept. I do not know whether you need the updates to avoid problems. I updated my plug-ins prior to upgrading to 3.4.

Maybe you are looking for