Loading ...
Sorry, an error occurred while loading the content.

Re: [SQLQueriesNoCode] Need help in to get data fast

Expand Messages
  • Hendra Prakasa
    Off course ur query will take a lot of resource, if like this : select ID2,(Select count (ID2) from table2 where ID2=Field1) ,Field5,Field3,Desc From USD join
    Message 1 of 10 , Jan 15, 2011
    • 0 Attachment
      Off course ur query will take a lot of resource, if like this :

      select ID2,(Select count (ID2) from table2 where ID2=Field1)
      ,Field5,Field3,Desc
      From USD
      join table2 on ID2=Field1

      You've got to change the query
      more or less like this
      Select count(id2), field5, field3
      From usd
      Left join table2 on
      Table2.id2=usd.field1
      Group by table2.id2, field5,field3

      Try that TSQL, and has ur table already had primary key and indexes ?

      Sent from my BlackBerry®
      powered by Sinyal Kuat INDOSAT

      -----Original Message-----
      From: ☺Aνιηαѕн ∂єѕαι™☺
      <avinashdesai10@...>
      Sender: "SQLQueriesNoCode@yahoogroups.com" <SQLQueriesNoCode@yahoogroups.com>
      Date: Sun, 16 Jan 2011 12:50:51
      To: SQL Code group<SQLQueriesNoCode@yahoogroups.com>
      Reply-To: "SQLQueriesNoCode@yahoogroups.com"
      <SQLQueriesNoCode@yahoogroups.com>
      Subject: [SQLQueriesNoCode] Need help in to get data fast



      Dear Friends

      I am working with a huge database which has a table named table2 with
      4,63,22,505 records and this has only two columns namely ID1 and ID2

      I have one more table named USD which has 20 thousand data in it .

      So the structure of Table2 goes like this
      ID1 Nvarchar
      ID2 nvarchar

      USD Table

      Field3 nvarchar(50)
      Field1 nvarchar(50)
      Field2 text
      Field4 text
      Field5 datetime
      Field6 numeric(29, 0)
      Field7 numeric(29, 0)
      Field8 numeric(29, 0)
      NoOf numeric(29, 0)
      Desc text

      my query goes like this

      select ID2,(Select count (ID2) from table2 where ID2=Field1)
      ,Field5,Field3,Desc
      From USD
      join table2 on ID2=Field1

      As the query taking more time i.e., more than 2 hours .

      Please help me out solve this .
      --
      *Thanks & Regards
      Avinash Desai
      Save Our Environment... Save Paper.. Reuse Materials..*

      Think Before you print: Please consider our environment before printing this
      e-mail

      [Non-text portions of this message have been removed]





      [Non-text portions of this message have been removed]
    • Arindam
      Hello,   i am not able to connect local sql server which was getting connected properly before i installed VS2010 on my machine, now its giving the
      Message 2 of 10 , Feb 16, 2011
      • 0 Attachment
        Hello,
         
        i am not able to connect local sql server which was getting connected properly before i installed VS2010 on my machine, now its giving the following error
         
        TITLE: Connect to Server
        ------------------------------
        Cannot connect to ETG1\SQLEXPRESS.
        ------------------------------
        ADDITIONAL INFORMATION:
        This version of Microsoft SQL Server Management Studio Express can only be used to connect to SQL Server 2000 and SQL Server 2005 servers. (Microsoft.SqlServer.Express.ConnectionDlg)
        ------------------------------
        BUTTONS:
        OK
        ------------------------------

        though i am connecting to same 2005 instance only, i think some default setting has been updated during the vs2010 installation.
         
        can any one help me please ? 

        -Thanks



         
        Arindam Chakraborty
        Mumbai, India
        http://e-tigers.net/
        http://etgconsultancy.com/
         



        [Non-text portions of this message have been removed]
      • Joe Fawcett
        VS2010 has probably installed SQL Sever Express 2008. You need to check in services and see which versions are running. Failing that install the 2008 SQL
        Message 3 of 10 , Feb 16, 2011
        • 0 Attachment
          VS2010 has probably installed SQL Sever Express 2008. You need to check in
          services and see which versions are running. Failing that install the 2008
          SQL Server manager.
          Joe
          http://joe.fawcett.name/



          On 16 February 2011 15:43, Arindam <e_arindam@...> wrote:

          >
          >
          > Hello,
          >
          > i am not able to connect local sql server which was getting connected
          > properly before i installed VS2010 on my machine, now its giving the
          > following error
          >
          > TITLE: Connect to Server
          > ------------------------------
          > Cannot connect to ETG1\SQLEXPRESS.
          > ------------------------------
          > ADDITIONAL INFORMATION:
          > This version of Microsoft SQL Server Management Studio Express can only be
          > used to connect to SQL Server 2000 and SQL Server 2005 servers.
          > (Microsoft.SqlServer.Express.ConnectionDlg)
          > ------------------------------
          > BUTTONS:
          > OK
          > ------------------------------
          >
          > though i am connecting to same 2005 instance only, i think some default
          > setting has been updated during the vs2010 installation.
          >
          > can any one help me please ?
          >
          > -Thanks
          >
          >
          > Arindam Chakraborty
          > Mumbai, India
          > http://e-tigers.net/
          > http://etgconsultancy.com/
          >
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >


          [Non-text portions of this message have been removed]
        • Estefania Betanzos
          i don t have seen this error before but it sounds to me like the vs2010 replaced your sqlexpress2005 with the 2008 version, why don t you try to verify the
          Message 4 of 10 , Feb 16, 2011
          • 0 Attachment
            i don't have seen this error before but it sounds to me like the vs2010
            replaced your sqlexpress2005 with the 2008 version, why don't you try to
            verify the version of your sqlserver express

            2011/2/16 Arindam <e_arindam@...>

            >
            >
            > Hello,
            >
            > i am not able to connect local sql server which was getting connected
            > properly before i installed VS2010 on my machine, now its giving the
            > following error
            >
            > TITLE: Connect to Server
            > ------------------------------
            > Cannot connect to ETG1\SQLEXPRESS.
            > ------------------------------
            > ADDITIONAL INFORMATION:
            > This version of Microsoft SQL Server Management Studio Express can only be
            > used to connect to SQL Server 2000 and SQL Server 2005 servers.
            > (Microsoft.SqlServer.Express.ConnectionDlg)
            > ------------------------------
            > BUTTONS:
            > OK
            > ------------------------------
            >
            > though i am connecting to same 2005 instance only, i think some default
            > setting has been updated during the vs2010 installation.
            >
            > can any one help me please ?
            >
            > -Thanks
            >
            >
            > Arindam Chakraborty
            > Mumbai, India
            > http://e-tigers.net/
            > http://etgconsultancy.com/
            >
            >
            > [Non-text portions of this message have been removed]
            >
            >
            >


            [Non-text portions of this message have been removed]
          • Sudhir Babu.Gadiputi
            Hello You installed vs 2010 and by default sql server also installed and when you tried to connect it gives error. So u need to installed sql server 2005 or
            Message 5 of 10 , Feb 17, 2011
            • 0 Attachment
              Hello



              You installed vs 2010 and by default sql server also installed and when you
              tried to connect it gives error.



              So u need to installed sql server 2005 or you want to access sql express
              then u need to download sqlexpess management studio



              I hopes it will help you.





              Thanks & Regards

              Sudhir Babu.G


              --
              Thanks & Regards
              G.Sudhir Babu
              http://www.linkedin.com/in/sudhirbabu

              Success is not final, Failure is not fatal; Its only the courage to continue
              that counts


              [Non-text portions of this message have been removed]
            • Arindam
              yes right i have installed vs2010, but for sql do i need to install 2005 or 2008 ? while installing Server 2008 R2 i am getting some error, please take a look
              Message 6 of 10 , Mar 11, 2011
              • 0 Attachment
                yes right i have installed vs2010, but for sql do i need to install 2005 or 2008 ? while installing Server 2008 R2 i am getting some error, please take a look at the follwoing errror.
                http://arindamachakraborty.blogspot.com/2011/03/server-2008-r2-installation-problem.html%c2%a0




                -Thanks
                 
                Arindam Chakraborty
                Mumbai, India
                http://e-tigers.net/
                http://etgconsultancy.com/
                 

                --- On Thu, 17/2/11, Sudhir Babu.Gadiputi <mail2sudhir1979@...> wrote:


                From: Sudhir Babu.Gadiputi <mail2sudhir1979@...>
                Subject: RE: [SQLQueriesNoCode] not able to connect local sql server
                To: SQLQueriesNoCode@yahoogroups.com
                Date: Thursday, 17 February, 2011, 4:08 PM


                 



                Hello

                You installed vs 2010 and by default sql server also installed and when you
                tried to connect it gives error.

                So u need to installed sql server 2005 or you want to access sql express
                then u need to download sqlexpess management studio

                I hopes it will help you.

                Thanks & Regards

                Sudhir Babu.G

                --
                Thanks & Regards
                G.Sudhir Babu
                http://www.linkedin.com/in/sudhirbabu

                Success is not final, Failure is not fatal; Its only the courage to continue
                that counts

                [Non-text portions of this message have been removed]










                [Non-text portions of this message have been removed]
              Your message has been successfully submitted and would be delivered to recipients shortly.