• amir.mochtar (8/10/2011)


    i created #tmp table when processing large of rows then i made index for some columns, those are often used in inquiry. Did i do right?

    The only problem with the indexes on temp tables in stored procedures or scripts is that they are not given by the SQL engine unique names as in the case of temp tables themselves. So if one connection invokes a procedure or script that creates a temp table and then its indexes, a second connection that will try to do this at the same time will fail because the indexes were already created by the first one. Remember, objects in SQL server has to have unique names.

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist