Which is fast ? Select * from tableName or Select Column1,Column2 .... From tableName ? and Why ?

Which is fast ? Select * from tableName or Select Column1,Column2 .... From tableName ? and Why ?
select * from Sales.[SalesOrderHeader]
select SalesOrderNumber,RevisionNumber,rowguid from Sales.[SalesOrderHeader]
As you can see both the query execution plan and subtree cost is same. So how selecting the particular columns optimize the query ?

Which is fast ? Select * from tableName or Select Column1,Column2 .... From tableName ? and Why ?
select * from Sales.[SalesOrderHeader]
select SalesOrderNumber,RevisionNumber,rowguid from Sales.[SalesOrderHeader]
As you can see both the query execution plan and subtree cost is same. So how selecting the particular columns optimize the query ?
Yes, selecting specific columns is always better than select *.
If you always need few columns in result, then just use SELECT col1, col2 FROM YourTable. If you SELECT * FROM YourTable; that is extra useless overhead.
If in future if someone adds Image/BLOB/Text type columns in your table, using SELECT * will worsen the performace for sure.
Let's say if you have SP and you use INSERT INTO DestTable SELECT * FROM TABLE which runs fine BUT again if someone adds few more columns then your SP will fail saying provided columns don't match.
-Vaibhav Chaudhari

Similar Messages

  • How to decide which adapter to use from IDOC and RFC?

    Hi All,
    When interating XI with an SAP system,
    How to decide which adapter to use from IDOC and RFC?
    Thanks.

    Hi,
    you can also consider to use ABAP Proxy if you are working with Systems based on SAP Web AS 6.40.
    Here some useful links:
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/02/265c3cf311070ae10000000a114084/content.htm">ABAP Proxy Runtime</a>
    ABAP Proxies in XI(Client Proxy)
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    ABAP Server Proxies
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    How do you activate ABAP Proxies?
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    XI: Reliable Messaging EOIO in ABAP Proxies
    /people/arulraja.ma/blog/2006/08/18/xi-reliable-messaging-150-eoio-in-abap-proxies
    More links for proxy:
    proxies and performance...
    Hope this help
    Francesco

  • How to write Join View Adaptor which will pull data from Siebel and OID ?

    Hi Experts,
    I wanted to write web service call where OIF will talk to OVD than OVD will have join adaptor which will pull few data like msisdn from Siebel and view data from oid like given name and generate SAML assertion.
    I wanted to know how to write join adaptor for the same
    Help Appreciated.

    Hi Experts,
    Is anyone has any idea on webservice call to OIF which will call OVD that will have join adaptor connecting siebel and oid ?
    any help is appreciated

  • My iPhone 5 was reset by mistake now my music won't download which I'd purchased from iTunes and I tried buying another tune on iTunes , it won't download to my phone but it downloaded to my ipad3

    Hi can anyone help please, my iPhone 5 was reset by mistake and now my music will not download to it even though it was bought from iTunes, i purchased another song with my iphone5 and it won't download ether to my phone but has downloaded to my ipad3

    Try force-closing the music app on your iPad by double-tapping the home button, swiping up on the preview above the music app, then tap the home button again.  Then reset the iPad by holding the power and home buttons at the same time until you see the Apple logo, then release.  When it restarts go to Settings>iTunes & App Store, tap the ID, sign out, then sign back in.  Then try downloading the songs from iCloud again.

  • All of a sudden when downloading free apps i ger error code that the security code on my cc is invalid.  I havnt changed anything! How do i check my billing info from ipad and why am i getting message in first place?

    How do i check my billing info from ipad? All of a sudden im getting error messages that sec code on my cc is invalid when i go to download FREE apps? I havnt changed a thing on my end to warrant this error message

    Same thing happened to me with my peruvian credit card in the peruvian app store, I want to buy an app, but it says that my credit card is "not supported in the Peruvian app store"

  • How can you tell how much space is being used up by your iTunes...I am trying to figure out how much space I will need to transfer my iTunes library to an iPod and which iPod to select?

    How can you tell how much space is being used up by your iTunes...I am trying to figure out how much space I will need to transfer my iTunes library to an iPod and which iPod to select?

    Start up iTunes, and select Music, then click Songs.
    Down at the bottom of the iTunes window, it will tell you how much space your library occupies.

  • Which is fast / Smooth performing?

    I have 10 circles on the stage, animated on the time line, simple animation like scale, rotation and size changes.
    Which will give me best performance in terms of browser load and smoothness of animation?
    Ellipse or Svg file
    What if it is 100 objects, or even 1000 objects?

    Which is fast ? Select * from tableName or Select Column1,Column2 .... From tableName ? and Why ?
    select * from Sales.[SalesOrderHeader]
    select SalesOrderNumber,RevisionNumber,rowguid from Sales.[SalesOrderHeader]
    As you can see both the query execution plan and subtree cost is same. So how selecting the particular columns optimize the query ?
    Yes, selecting specific columns is always better than select *.
    If you always need few columns in result, then just use SELECT col1, col2 FROM YourTable. If you SELECT * FROM YourTable; that is extra useless overhead.
    If in future if someone adds Image/BLOB/Text type columns in your table, using SELECT * will worsen the performace for sure.
    Let's say if you have SP and you use INSERT INTO DestTable SELECT * FROM TABLE which runs fine BUT again if someone adds few more columns then your SP will fail saying provided columns don't match.
    -Vaibhav Chaudhari

  • Music completely disappeared from itunes and computer

    I got on my iTunes today and my music all said that the location could not be found. I don't know how or why, for I haven't changed anything or moved my music folder around. Out of over 2000 songs, only 800 remain. But all my folders are still there. All the artist folders in my iTunes folder are all there...but I have no idea where the music went. I did a search and the songs didn't come up. WHY did my music disappear from iTunes and WHY only some of them?! I'd love to say I have them saved on my iPod but my iPod is only 4 gigs and I had over 12 gigs of music so obviously I can't recover all of them. Someone help me find my music!!!

    Nobody likes replying to posts like this - if you've searched all your hard drives and the music files are gone, then they're gone.
    I assume you looked in the Recycle Bin and did a Win Explorer search instead of just looking in the known folders?
    Who knows why this happened! Disasters like this usually convince folks to make regular backups.

  • So I keep trying to sync music to my iPhone from iTunes, and whenever I select the album the sync goes by really fast and nothing goes onto my phone. Then when I click "On this iPhone" it shows the songs, but they're grey, and I can't click on them. Help?

    So I keep trying to sync music to my iPhone from iTunes, and whenever I select the album the sync goes by really fast and nothing goes onto my phone. Then when I click "On this iPhone" it shows the songs, but they're grey, and I can't click on them. Help?

    Ok, sorry. And yes, I just restored my iPhone as new and tried to put all the songs on there before I even restored with my previous backup, but it still does the same thing... even when I just checked the option to sync only "selected music or videos". How's that possible?
    P.S. After I tried syncing with checked songs only, nothing showed up under Music on my phone and this message popped up in iTunes: "The iPhone "..." could not be synced because the sync session failed to finish." If you could, please tell me what that means, thanks.

  • Identifying which line was selected from a WebDynpro table

    Hi,
    can any one give me some advice, I've created a view which displays a table of filenames, which in fact are "LinkToAction" columns. The idea was that when a filename(LinkToAction) was selected, I could retrieve the appropriate file from the Applicatio server and Open the file in Excel or Save as Excel. My problem is, when I select a filename I don't know how to identify what line was selected in the table. Any advice would be great.
    Thanks,
    C

    Hi , Just identify its element which is lead selected and read attribut of that element .
    Have the code for the same
    DATA:
        node_nd_worlflow                    TYPE REF TO if_wd_context_node,
        elem_nd_worlflow                    TYPE REF TO if_wd_context_element,
        stru_nd_worlflow                    TYPE wd_this->element_nd_worlflow ,
        lead_selection_index                TYPE i,
        relation_no                         TYPE guid_32.
    navigate from <CONTEXT> to <ND_WORLFLOW> via lead selection
      node_nd_worlflow = wd_context->get_child_node( name = wd_this->wdctx_nd_worlflow ).
    @TODO handle not set lead selection
      IF ( node_nd_worlflow IS INITIAL ).
      ENDIF.
    get element via lead selection
      lead_selection_index = node_nd_worlflow->get_lead_selection_index( ).
      elem_nd_worlflow = node_nd_worlflow->get_element( index = lead_selection_index ).
    elem_nd_worlflow->get_static_attributes( IMPORTING static_attributes = stru_nd_worlflow ).
    Cheers
    Parry

  • Email always from default account no matter which account I select

    First let me say that I have an iPhone 4 using version 4.3.5 (8L1) of the iOS.
    My issue is that when I compose or reply to an email through Mail it always sends from my default email, in this case Gmail, no matter which account I select in the From: field. Even when I compose an email from the Inbox of a particular account it sends from the default account.
    I first noticed this today, which it has never done before. My wife's iPhone works fine.
    I've tried reseting the phone through iTunes then restoring from a backup, but it is still happening.
    I really don't want to have to change my settings every time I reply or compose an email.
    Any help would be greatly appreciated as this is very frustrating.
    Thanks,

    Sounds like something is corrupted, and if so then re-loading your backup won't solve the problem. That means restoring again, but this time without loading a backup (i.e. set it up as a new phone ... meaning you'll have to re-do all your settings, preferences, and account set-ups, as well as re-load all the media). Not fun, but sometimes that's the only way to "exorcise" such demons.

  • Copy select value in the textfield from LOV and allow user to edit it

    Hi,
    I have a datablock with 20 records and each record has comments (say field_comments) fields. I would like to allow user to choose predefined comments populated from LOV (say lov_comments) and to append some extra comments after they choose the value from LOV.
    I have created a LOV and added Return type “field_comments” in the column mapping properties. When user clicks on a button, LOV opens up. They select the value from the LOV and the value goes to “field_comment” field. The problem with this approach, user can’t add their comment after selecting from LOV.
    I tried this way too. I created another non-visible textbox (say dummy). In the LOV, I added “dummy” field as returntype. In the dummy field, I have created “POST-CHANGE” trigger which basically says :block. field_comments = :block. Dummy.
    But, the user has to click on other field to view the selected value from the LOV. The values in the “field_comments” is not updated as soon as user click on “OK” button in the LOV.
    I would appreciate it if somebody could give me some input and help to solve my issue. Thank you for your help.
    Thank.

    Well, I tried exactly what you posted and it allowed me to SELECT from LOV and then CHANGE/APPEND new text in front of returned value in the field. It saved to the database and queried without any problems.
    Is your item allowed to INSERT/UPDATE ? If not, then set "Update/Insert Allowed" properties to Yes and attach your LOV to the item and set "Validate from list" to No.
    You may also see if you have any validation being performed on WHEN-VALIDATE-ITEM or POST-CHANGE trigger which will fail since you are editing the values populated from LOV.
    Hope it helps!

  • How to get the specific name of the workset which is currently selected by the user in sap portal 7.0

    Dear Expert,
    I have one requirement like to read the selected workset name in portal by the current user.I have read two documents regarding how to retrieve the PCD contents (iViews, Pages, Worksets and Roles) and its properties like Created by, Changed by, Last changed by and others using PCD API.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6112ecb7-0a01-0010-ef90-941c70c9e401?overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508baf88-9335-2d10-efa6-c6ad61e5fc4b?quicklink=index&overridelayout=true
    But I am not able to understand how to get the specific name of the workset which is currently selected by the user.Can you please help me.
    I am using portal 7.0.
    Thanks & Regards,
    Patralekha

    Hi Expert,
    I found that we can use Interface INavigationHelperService to read Portal Role selected by user at runtime from http://scn.sap.com/thread/52194
    But this class is available in SAP NetWeaver 7.30 Enterprise Portal .
    But in SAP NetWeaver 7.0 Enterprise Portal that interface is not available.
    INavigationService is available there.
    But didn't get any proper discussion on this interface for the same requirement.
    Can you please help me.
    Thanks & Regards,
    Patralekha

  • I use classical Hebrew for my work, and Pages will only display English characters even with a Hebrew font selected. If I cut and paste Hebrew characters from another document, as long as the font is supported, it will appear in Pages.  If I type it won't

    I use classical Hebrew for my work, and Pages will only display English characters even with a Hebrew font selected. If I cut and paste Hebrew characters from another document, as long as the font is supported, it will appear in Pages.  If I type it won't continue in Hebrew.  I have tried downloading several fonts, including those from professional societies, but the only way to get Hebrew in my document is to cut and paste.  Does anyone know how to fix this?  I use an older MacBook running OS 10.9.1.  I used to do my Hebrew work in Word, but it is no longer supported by Mac OS.

    Just clarifying:
    Pages '09 has bad support for Hebrew, Arabic etc but will accept pasted text.
    Pages 5 has much better support but with bugs.
    If you have columns they are in the wrong order ie Text starts in the left column and ends in the right column.
    If you type English into Hebrew text it tends to fall in the wrong position eg instead of to the left of Hebrew punctuation it goes to the right.
    As Tom recommends the only real solution on the Mac is Mellel.
    Peter
    btw Tell Apple, they are amazingly slow to fix this running sore which has been broken since RtoL was supposedly introduced in OSX 10.2.3 over a decade ago.
    Peter

  • Which Technology was selected then creating Master Repository for ODI?

    Hi,
    Which Technology was selected then creating Master Repository for ODI SQL Server 2003? Which technolgy must be selected?
    First of all I created master repository for ODI on SQL Server 2003 via Microsoft SQL Server, it did not work.
    I checked the Driver and URL as below
    com.microsoft.sqlserver.jdbc.SQLServerDriver
    jdbc:sqlserver://<servername>:<PortNumber>;selectMthod=cursor;databasename=<databasename>;integratedsecurity=false
    there is a error as below
    com.sunopsis.tools.core.exception.SnpsRuntimeException: com.sunopsis.tools.core.exception.SnpsRuntimeException: Unable to find the XML file corresponding to your technology.
         at oracle.odi.sdk.repository.OdiRepositoryManager.createMasterRepository(OdiRepositoryManager.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.d(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.f(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.a(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.a(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard$IvjEventHandler.actionPerformed(MasterRepositoryWizard.java)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: com.sunopsis.tools.core.exception.SnpsRuntimeException: Unable to find the XML file corresponding to your technology.
         at com.sunopsis.repository.manager.RepositoryManager.masterRepositoryCreation(RepositoryManager.java)
         ... 29 more
    Caused by:
    com.sunopsis.tools.core.exception.SnpsRuntimeException: Unable to find the XML file corresponding to your technology.
         at com.sunopsis.repository.manager.RepositoryManager.masterRepositoryCreation(RepositoryManager.java)
         at oracle.odi.sdk.repository.OdiRepositoryManager.createMasterRepository(OdiRepositoryManager.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.d(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.f(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.a(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.a(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard$IvjEventHandler.actionPerformed(MasterRepositoryWizard.java)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    okan
    Edited by: ankist on Jan 15, 2010 2:46 PM

    It is highly recommended to use the JDBC Driver for SQL Server 2005, even if you are using SQL Server 2000. In ODI's pre-populated lists, it is not there - you will have to (1) get the driver yourself, downloadable from the Microsoft site. (get the driver v1.2, not the 2.0, and use a JRE v1.5, 1.5 or 1.6. The 2.0 driver from Microsoft requires the JRE 1.6)
    (2) use the
    Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
    and the URL: jdbc:sqlserver://<myserver>:<myport, default 1433>;database=<mydb>;selectMethod=cursor
    these are not automatic, you will need to type them in.
    The database must be configured for connections from tcpip.
    For more information see the blog: http://odiexperts.com/?tag=sql-server-2005

Maybe you are looking for

  • Purchased app does not appear in my list of Purchased Apps

    I have a receipt for the purchase of a Mac App via iTunes, but it doesn't appear in my list of purchased applications. How can I get a copy of the purchased application?A

  • I can't connect wifi after updating Windows.

    I installed Windows Embedded 8.1 Industry Pro. And I have 49 important updates. But after updating, I can't connect my wifi. Then I restore system, I can connect again. I have did this some times Before, I had installed Windows 8.1 Pro, it was the sa

  • Servicegen WLS 7.0

    Hi i have created a complex holder class according the instructions in the 7.0 Documentation to get more than one returnvalue from a webservice. After calling the servicegen task i always get the error "Could not copy class file to working war". Does

  • Saving image as file or in database

    What is the best practice for saving user uploaded picture? Should that image be saved in database or in some directory.

  • Artwork Not Loading - Error Message in Console

    I am having trouble loading Album Artwork. I have tried fetching it via Advanced option in ITUNES both logged in and logged out of the STORE. I noticed following error message in console: 22/10/2009 20:44:20 [0x0-0x5a05a].com.apple.iTunes[697] Thu Oc