Forum Replies Created

Viewing 15 posts - 1,726 through 1,740 (of 2,038 total)

  • RE: Fastest way to fetch 10 milion records in a Desktop application that uses SqlServer2005 as Database

    But I don't think the user wants to see all the 10 million items. So I think your user has a GUI where (s)he specifies to update the items. Formerly...

  • RE: Group By Clause ???

    Mike Levan (3/26/2009)


    does it mean OPENQUERY will use less resource than regular query? what happens when openquery is used with respect to the timeout and using resources.

    Nope.

    The difference between OPENQUERY...

  • RE: Fastest way to fetch 10 milion records in a Desktop application that uses SqlServer2005 as Database

    Hi

    Why do you want to load the data onto client? What do you want to update at these data?

    The fastest way definitely is to do in with SQL on the...

  • RE: Primary Key

    Hi

    I would advice to use QUOTENAME to avoid SQL injections:

    ALTER PROCEDURE [dbo].[rkn_pk]

    @tabname CHAR(50),

    @colname CHAR(50)

    AS

    BEGIN

    SELECT @tabname = LTRIM(RTRIM(@tabname)), @colname = LTRIM(RTRIM(@colname))

    ...

  • RE: Rebuild index Necessary?

    jchandramouli (3/26/2009)


    Hi,

    A function that fetches some records from table containing 3555000 records took nearly a minute. I gave an index and rebuild it. The time reduced drastically.

    My question is whether...

  • RE: Rebuild index Necessary?

    Hi

    Directly after the creation of the index you don't have to rebuild it. This re-creates the index 😛

    But you have to monitor the index fragmentation and its scan density and...

  • RE: top - 1 ROW !

    Hi christophe

    As mazzz already wrote you can handle this with the ROW_NUMBER() function. Try this:

    DECLARE @t TABLE (id INT IDENTITY, statut INT)

    INSERT INTO @t

    ...

  • RE: Locking in insert statement

    Hi

    Please try this statement (thanks to Mohit 😉 ) for more specific information about the "INSERT":

    SELECT TOP(50)

    qs.total_worker_time / execution_count as avg_worker_time,

    ...

  • RE: Please help me guys

    Hi

    So you need this information because:

    * You want to know if it is the right job for you?

    * For your application?

    Did you have a look at http://en.wikipedia.org/wiki/Database_administrator . Does this...

  • RE: Please help me guys

    Hi vijay

    If you give a bit more information why you need this we may be possible to give you what you need :-).

    Without any more specific information the answer just...

  • RE: Commitable transaction after error?

    Hi Barkingdog

    It depends... Maybe you have a procedure which first INSERTs a record into a table and after this you are doing some logging or things like that. If your...

  • RE: use top in a loop question

    I see! I didn't know.

    Thanks for assertion (again 🙂 )!

  • RE: use top in a loop question

    Bruce W Cassidy (3/25/2009)


    [font="Verdana"]I concur with Flo: this has been my approach to batched updates (or inserts, or deletes) in the past.

    It was a bit harder in SQL Server 2000:...

  • RE: Execute a table of statements

    Bruce W Cassidy (3/25/2009)


    [font="Verdana"]Another idea...

    Part of the SQLCMD is the ability to create variables for the environment (rather than T-SQL variables.) You could use this to build a command...

  • RE: Execute a table of statements

    Bruce W Cassidy (3/25/2009)


    [font="Verdana"]Flo, I've actually dynamically built stored procedures and then executed them in the past for this kind of thing. So you'd end up with code that...

Viewing 15 posts - 1,726 through 1,740 (of 2,038 total)