SQL Server performance in Vista x64 driving me mad!!

Posts   
 
    
Posts: 497
Joined: 08-Apr-2004
# Posted on: 23-Oct-2008 11:31:04   

Hi all,

I know this isn't an LLBLGen question, but I thought I'd post it here in case anyone knows what the problem is.

We have a script that inserts all the localized strings for the application. All it is is about 60,000 "Insert into ... " statements that execute against the database.

On my Vista machine, using a local SQL Server 2005 or 2008 database server, it takes 400 seconds to execute this script! However, on a virtual image I have windows XP and the same SQL server setup, and it takes just 20 seconds. It also takes just 20 seconds in Windows 2003, and Windows Server 2008 (all 32 bit)

Its driving me mad! Has anyone come across anything similar?

Matt.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 23-Oct-2008 11:34:54   

Has your db file enough room? If not it might extend at every insert or two simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Posts: 497
Joined: 08-Apr-2004
# Posted on: 23-Oct-2008 12:39:51   

Hi Frans - good to hear from you - its been a while simple_smile

Thanks for the tip, but no joy. I re-allocated the data and log files a lot more space than they need, and then re-ran the script, and no joy with that one.

Matt.

Posts: 497
Joined: 08-Apr-2004
# Posted on: 23-Oct-2008 14:51:14   

If anyone is interested in checking this out - I've recreated the scenario with the SQL below - it just inserts 20,000 rows into a simple table.

On my quad core dell beast, this takes 2m16S to execute. On a virtual PC running Windows server 2008, it takes 6 seconds! I honestly think its just vista being crap!


CREATE TABLE dbo.Test
    (
    ID int NOT NULL IDENTITY (1, 1),
    Title nvarchar(255) NULL
    )  ON [PRIMARY]
GO
ALTER TABLE dbo.Test ADD CONSTRAINT
    PK_Table_1 PRIMARY KEY CLUSTERED 
    (
    ID
    ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

GO
ALTER TABLE dbo.Test SET (LOCK_ESCALATION = TABLE)
GO
COMMIT

BEGIN
    Declare @tmp int
    set @tmp = 0
    while @tmp < 20000
    BEGIN
        Insert into Test (Title) Values ('Test' + Convert(varchar(100),@tmp))
        set @tmp = @tmp + 1
    END
END



Jez
User
Posts: 198
Joined: 01-May-2006
# Posted on: 23-Oct-2008 15:18:46   

I just tried this and it took 11 seconds on my Vista machine (Dual core, 4gb ram, x64/SP1).

Posts: 497
Joined: 08-Apr-2004
# Posted on: 23-Oct-2008 15:37:04   

Thats so weird! I have 8Gig ram, and a quad core, and Vista x64 sp1. I've tried SQL server 2005 and 2008. I wonder if I need to tweak any network settings for SQL Server...

DvK
User
Posts: 318
Joined: 22-Mar-2006
# Posted on: 23-Oct-2008 16:15:13   

Try reorganizing your database. This has worked / helped me out solving some strange performance problems with SQL 2005 before.

grtz, Danny

Posts: 497
Joined: 08-Apr-2004
# Posted on: 28-Oct-2008 10:42:32   

Still no joy - I tried creating a brand new database, makes no difference.

I also just tried un-installing everything related to SQL Server, and installing SQL Server 2008 express, to see if that makes a difference - still takes minutes and minutes to do the inserts.

Argh!

twaindev avatar
twaindev
User
Posts: 178
Joined: 08-Oct-2007
# Posted on: 29-Oct-2008 19:32:22   

It runs in just 6 seconds on my machine (Dual Core with 8 GB running Vista x64 SP1).

Posts: 497
Joined: 08-Apr-2004
# Posted on: 31-Oct-2008 14:32:30   

Ok, thanks to everyone for your help on this. I'm going to put it down to a OS setup issue on this machine, a re-install of the OS will almost def. fix it I think...