Forum Replies Created

Viewing 15 posts - 541 through 555 (of 582 total)

  • RE: Best practice when to use an index

    Or use

    DBCC PINTABLE <t>

    SELECT * into #t FROM <t>

    DROP TABLE #t

    at startup to load and keep the table in the buffer cache.

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Triggers vs. Foreign-keys?

    You can precisely replicate the functionality of a FK constraint using a trigger. But you will effectively be rewriting Sybase/MS C (or whatever it is) code, using T-SQL. I can't...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Best practice when to use an index

    SARG = Search argument - the column that is being searched. I think this is more common amongst Oracle programmers for some reason(?).

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Best practice when to use an index

    quote:


    quote:


    If its an internet app then not very much x huge audience =...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Best practice when to use an index

    Frank,

    quote:


    Now when the fill factor is less than 100% you might be wasting space, when it is 100% you're in risk...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Best practice when to use an index

    Frank,

    A clustered index will always have a root node page, so I think Jeremy is right that an index always means at least two reads. That means (I guess) that...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Updating specific strings to UPPER

    Your query will have to scan the whole table anyway.

    But cast(streetname as varbinary) != cast(upper(streetname) as varbinary) would work to restrict the update to the columns you want.

    As...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: eliminating duplicates from stored procedure joins

    DOH! In the preceding post, "&.n.b.s.p" (without dots) was rendered as " ".

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: eliminating duplicates from stored procedure joins

    You need some sort of hierarchical display for the data: you could try outputting as XML, and using an XSL stylesheet to display the data (or for intranet on IE,...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Best practice when to use an index

    Jeremy -

    quote:


    unless the execution plan is wrong


    It often is, luckily for us.

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Best practice on table design

    Yes - if your row size means that a lot of space will be left on table pages (e.g. fixed row size of 3KB, * 2 = 6, leaves 2K...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Best practice when to use an index

    Reminder:

    When using a surrogate key (ID column), don't forget to put a unique constraint on the real (conceptual) primary key. That's the value you're going to need to search on,...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Best practice when to use an index

    I'd say it depends how wide the tables are. If they are just: surrogate key(PK ID int column), Param name (%char), Param value (%char), datatype, datalen, precision, then there's not...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: outer join perfomance question

    For very small tables, and for lookup tables with static data, (these are likely to be that same tables in practice), there is no need to update stats regularly -...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: outer join perfomance question

    If you have any time when the database is not in use or has low usage, set up weeekly jobs to update stats at those times. You may need to...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

Viewing 15 posts - 541 through 555 (of 582 total)