Forum Replies Created

Viewing 15 posts - 16 through 30 (of 51 total)

  • RE: Lock only one row in update (lock a row)

    GilaMonster (3/25/2013)


    abitguru (3/25/2013)


    Thanks McSQL, when I try those hits, I can't access other ID when I select ID 1 for example.

    Probably because SQL is taking row locks on every single...

  • RE: Lock only one row in update (lock a row)

    GilaMonster (3/25/2013)


    abitguru (3/25/2013)


    begin transaction

    SELECT * FROM Reque_pa with (updlock) WHERE CEREQ = 1

    WAITFOR DELAY '00:00:10';

    commit transaction

    This is seriously exactly what you have in your application, a select with a...

  • RE: Lock only one row in update (lock a row)

    Table definition

    USE [desarrollo]

    GO

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING ON

    GO

    CREATE TABLE [dbo].[reque_pa](

    [CEREQ] [decimal](4, 0) NOT NULL,

    [CENTR] [decimal](4, 0) NOT NULL,

    [SUCUR] [decimal](4, 0) NOT NULL,

    [EMPRE] [decimal](4, 0) NOT NULL,

    [NOMBR] [char](45) NOT NULL,

    [TINFO]...

  • RE: Lock only one row in update (lock a row)

    Not a makeshift example, what is the problem that you are trying to solve?

    I have a parameter table to number invoices for example, with around 20 records, this...

  • RE: Lock only one row in update (lock a row)

    Lock escalation is when SQL takes row or page locks to start and part way through running the query converts those to table locks because it's taking too many locks...

  • RE: Lock only one row in update (lock a row)

    Look at this image,

    connection 57 has this query

    update reque_pa with (updlock) set MINIMO = 2 WHERE CEREQ = 1

    connection 58 has this query

    SELECT * FROM Reque_pa WHERE...

  • RE: Lock only one row in update (lock a row)

    GilaMonster (3/25/2013)


    abitguru (3/25/2013)


    GilaMonster, Can I prevent lock escalation with (LOCK_ESCALATION = DISABLE) ?? So sql not escalate (only in this table)

    You can. So you'd prefer SQL to run out of...

  • RE: Lock only one row in update (lock a row)

    McSQL (3/25/2013)


    You can try disabling page locks for the index your query is using maybe and then try the UPDLOCK clause to make sure the row still gets locked;

    ALTER INDEX...

  • RE: Lock only one row in update (lock a row)

    Thanks McSQL

    Will read the thread!

    I try (with updlock) but dont work in my case, cause transaction 1 has a page lock that prevents transation 2 to takes a row

  • RE: Index Performance.

    thanks TheSqlGuru for your reply.

    We dont use auto update. And is hard to find a "slow/off time" .. you know. We are thinking the best way to schedule to run...

  • RE: Index Performance.

    thanks all for help me.!!

    Yesterday we test UPDATE STATISTICS in our dev server (almost size of production). Now we are planing the best way to do in our production server.

    Thanks...

  • RE: Index Performance.

    thanks !!!

    in addition, we never see in logs an error about index damage,

    we will try scheduling statics,

    btw, how often is recomended statics update?

  • RE: Question about SQL Server, Memomy, Disk, Configuration.

    Thanks for all your replies, we decided to reinstall and upgrade to windows server 2008 R2 and make some configures changes on the storage.

    thanks a lot

  • RE: Problem when change structure

    Thanks,

    We tested the server in many aspects, and find bottlenecks with disk. If we put less memory than 16Gb the performance decrease.

    However recreating a 24 million row table with...

  • RE: Problem when change structure

    Thanks a lot for the example! we will use it that way if there no other solution.

Viewing 15 posts - 16 through 30 (of 51 total)