Re: SQL Query problem take ages to run

From: -Permood (Permood_at_discussions.microsoft.com)
Date: 12/11/04


Date: Sat, 11 Dec 2004 10:37:02 -0800

Thanks you Louis, and Maxl.

is there any way, i can turn off loging when i use this query to stop this
transcation to be loged. second I am not very expert in dba type tasks, so to
check i/o is bit advance task for me, what should be my first step being a
new user to sql server.

"maxl@msn.com" wrote:

> Another consideration is the amount of disk i/o this INSERT is
> generating. SQL Server will allocate space in TempDB, the target
> database, and the target database transaction log. Since you are doing
> this as a single transaction, your transaction log will be larger than
> the resulting table data and TempDB will need space for any temporary
> tables created as a result of the Execution Plan.
>
> If you allow SQL Server to perform the allocations as needed, you will
> end up with a higher degree of disk fragmentation and SQL Server data
> structure allocation fragmentation.
>
> The DISTINCT will compound all this.
>
> You should not only avoid using DISTINCT, but also pre-allocate your
> databases.
>
>



Relevant Pages

  • Re: Transaction log problems
    ... IF you have to shrink a database or file it ... sure that you get that database backup on tape or to another machine. ... > We are using SQL Server 2000 on Windows Server 2003 Standard Edition, ... > One of the databases has recently begun showing large growth of the> transaction log and it is causing us some problems. ...
    (microsoft.public.sqlserver.server)
  • Re: SQL Query problem take ages to run
    ... SQL Server will allocate space in TempDB, ... database, and the target database transaction log. ... If you allow SQL Server to perform the allocations as needed, ...
    (microsoft.public.sqlserver.programming)
  • Re: Transaction Log Size
    ... listed in my article has detailed info on shrinking of the transaction log. ... Tibor Karaszi, SQL Server MVP ... > (database + transaction log) with fake appended to the name. ... >> CommVault to backup the backup files. ...
    (microsoft.public.sqlserver.server)
  • Transaction log problems
    ... We are using SQL Server 2000 on Windows Server 2003 Standard Edition, ... transaction log and it is causing us some problems. ... Because the database is used by the third party software, ... transaction log file and I would not have to monitor it so closely. ...
    (microsoft.public.sqlserver.server)
  • Re: Transaction Log Size
    ... Backup database does not empty the transaction log files. ... How to Shrink the SQL Server 7.0 Transaction Log ...
    (microsoft.public.sqlserver.server)