Forum Replies Created

Viewing 15 posts - 5,986 through 6,000 (of 7,616 total)

  • RE: Removal of Selected Indexes/Script Index Create for List of Indexes

    You did review the stats SQL Server provides on index usage and missing indexes before you made your changes, right?

    Edit: What indexes you think SQL will need/use and what indexes...

  • RE: TSQL Short-circuit

    TheSQLGuru (7/1/2014)

    Very few things in SQL Server land can/will short-circuit.

    I think that's over-stated. Most optimizers will short-circuit when they safely can. Presumably later versions of the optimizer...

  • RE: Good practice to separate tables with static data?

    I wouldn't want to put them in a separate schema unless you really had to. Aside from hideous renaming issues (*), you might end up with what seems like...

  • RE: Need to resume code execution efter error

    If you want to keep/commit previous activities in the loop, you likely need to explicitly BEGIN and COMMIT a tran for each loop, something like this:

    WHILE ...

    BEGIN

    ...

  • RE: Duplicate a table

    is there any possible way to keep the table as it is without effecting the current database performance.

    Try clustering the table by datetime (rather than identity, I'm guessing) and specify...

  • RE: Stored Procedure Performance

    cbrammer1219 (7/2/2014)


    Can a Index be on the Identity that is created on the insert?

    Yes, it can be.

    For overall performance, what is really critical is determining the best column(s) for the...

  • RE: Stored Procedure Performance

    Given that it's a single string being split, I don't think there's much to gain by changing that code.

  • RE: Stored Procedure Performance

    there are no pk or fk in the tables

    Don't care about pk/fk specifically. What indexes currently exist on these tables? Could you add a computed column(s) and create...

  • RE: does order in from/where matter?

    does the order of predicates in where clause matter?

    Not generally. But CASE WHEN conditions are always evaluated serially (as far as returning a result is concerned), so in that...

  • RE: dba setup rights (like ntfs)

    Also, be sure the relevant non-DBAs properly enable IFI and other local/policy/Windows permissions that are needed for SQL accounts, proxy accounts, etc..

  • RE: noncluster index and cluster index

    Yes, you can create a non-clustered index w/o a clustered index, but you (almost) never should.

    The cluster key does not have to be defined as unique (SQL will internally make...

  • RE: dba setup rights (like ntfs)

    Honestly the DBA should have admin access to the server to have maximum effectiveness.

    If you don't, and in particular if you don't have direct directory access/control, be extraordinarily careful before...

  • RE: packaging a backup/restore script within a stored procedure

    You can't have a

    GO

    within a stored procedure. The first GO ends the stored procedure definition.

  • RE: table variable issues

    Don't use a simple UNIQUE constraint. You have to define a primary key, and the only way it's really useful to your query is if the first column in...

  • RE: need to select a column with the repalcement of '0'

    I'd strongly urge you to use a character-based method rather than simply trying to CAST to numeric, which is almost certain to cause a non-numeric data exception.

    SELECT valid_id, SUBSTRING(valid_no, PATINDEX('%[^0]%',...

Viewing 15 posts - 5,986 through 6,000 (of 7,616 total)