Forum Replies Created

Viewing 15 posts - 1 through 15 (of 26 total)

  • RE: Clustered or NonClustered

    quote:


    Is it usually adviced to place Clustered Index for Primary Key values?


    Not necessarily. The best...

  • RE: Group By expression

    When I have queries with complicated grouping needs, I frequently just select the results into a table variable along with another column that makes it easier for me to sort/group....

  • RE: Unknown person probing my database security

    Is it possible for you to change the port of your SQL Server just to add a small obscurity layer? Do you have a lot of installations that depend on...

  • RE: OPENROWSET

    According to the "Remarks" section in the product documentation:

    "OPENROWSET does not accept variables for its arguments."

    - Troy King

  • RE: Deleting Users and Logins - Error Msg

    Examine the output and/or source of sp_helplogins 'MyLogin' for some ideas.

    - Troy King

  • RE: Excessive Delete Time/Table Locking

    Gotta second what omen said. Remember that DELETEs have WHEREs, so they benefit from indexes just like SELECTs do. Make sure that whatever WHERE is being used in your delete...

  • RE: Timeout on a database table

    How big is your audioreferences table? It could be the foreign key lookup from audiofields to audioreferences that's slowing you down.

    - Troy King

  • RE: Specifying position when adding a column

    Alternately, create new table with columns like you want them, INSERT SELECT all the rows into the new table, drop the old table, sp_rename the new. That's essentially what Enterprise...

  • RE: Query Analyzer vs Stored Procedure.

    Is the .NET app possibly making changes to the structure of any items the query touches, thus forcing the sp to recompile?

    - Troy King

  • RE: Very slow query

    When I have really hot tables that also need fairly frequent queries, I sometimes specify the (nolock) hint in my read-only queries. I never have locking problems from those :)....

  • RE: SQL editor recommendations

    I use either Query Analyzer or whatever my favorite text editor of the day is with shelled/captured osql. The new templates feature in Query Analyzer, though not up to snuff...

  • RE: Permissions per Record - best practice?

    quote:


    Won't the users/data/persmissions table become VERY large? ... 20,000,000 records ...


    Well how else are you...

  • RE: Permissions per Record - best practice?

    I hate to post a "Me too," but the method Brian mentioned is how we do it as well... I have a data table, a users table, a permissions table,...

  • RE: different types of cursors

    It's not set on SQL Server per se, it's set in the client library you use to access SQL Server. ADO, for example, has settings for specifying whether it should...

  • RE: Rows in Table

    exec sp_spaceused 'MYTABLE'

    You could also use SELECT COUNT(*) FROM MYTABLE, but that would be very slow if you don't have a no-NULLs nonclustered indexed column on the table. I'd use...

Viewing 15 posts - 1 through 15 (of 26 total)