Re: adding index NETS "Deadlock" ???
From: Ray Higdon (sqlhigdon_at_nospam.yahoo.com)
Date: 03/05/04
- Next message: Ray Higdon: "Re: CANNOT FOUND PDSSQL.DLL"
- Previous message: Jasper Smith: "Re: Urgent. C:\SQL.log is eating up disk space"
- In reply to: Geoff N. Hiten: "Re: adding index NETS "Deadlock" ???"
- Next in thread: Jaxon: "Re: adding index NETS "Deadlock" ???"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 5 Mar 2004 18:17:09 -0500
>From Geoff's post, If you will not have that many rows, you might get away
with using an INT data type rather than a bigint
-- Ray Higdon MCSE, MCDBA, CCNA --- "Geoff N. Hiten" <SRDBA@Careerbuilder.com> wrote in message news:%23z$JyxuAEHA.2480@TK2MSFTNGP11.phx.gbl... > Add a RowID BigINT Identity(1,1) to the beginning of the table. > > Clustered UNIQUE index on RowID. > > Noncluster index on Startime > > Write stored procedures to do inserts, updates, and deletes. > > Make developers use those procedures ONLY for accessing the table. > > Watch the system run very fast. > > -- > Geoff N. Hiten > Microsoft SQL Server MVP > Senior Database Administrator > Careerbuilder.com > > I support the Professional Association for SQL Server > www.sqlpass.org > > "Jaxon" <GregoryAJacksonN0SPAM@hotmail.com> wrote in message > news:uDBxDftAEHA.712@tk2msftngp13.phx.gbl... > > Can you guys help me understand the logic here. > > > > have a very small jobQueue table > > > > JobId > > StartTime > > EndTime > > JobTypeId > > ParentJobId > > a few other trivial columns > > > > table gets smacked all day long (thousands and thousands of times) > > > > one stored procedure (spGetNextJob) is doing table scans based on no index > > placed on StartTime. Taking 1,000+ ms to execute which is clearly > > unacceptable. > > > > I add a nonclustered index on StartTime and get Deadlocks in Production. > > > > My confusion is that Indexes dont cause deadlocks, accessing objects in > > inconsistent order causes deadlocks..... > > > > HOW, can adding an index on the table create a deadlock scenario. > > > > (Table is constantly truncated, so never really has more than a couple > > hundred records) > > > > > > Greg Jackson > > PDX, Oregon > > > > > >
- Next message: Ray Higdon: "Re: CANNOT FOUND PDSSQL.DLL"
- Previous message: Jasper Smith: "Re: Urgent. C:\SQL.log is eating up disk space"
- In reply to: Geoff N. Hiten: "Re: adding index NETS "Deadlock" ???"
- Next in thread: Jaxon: "Re: adding index NETS "Deadlock" ???"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|