• crainlee2 (11/17/2008)


    This seems so fundamental that I almost think I shouldn't mention it but I will anyway.

    When designing a database, its indexes, and the queries that access it, do everything you can to:

    1. not use the database at all (I've known programmers who used it for logging when a flat file would have been much more efficient.),

    2. avoid physical disk writes (they are significantly slower than disk reads),

    3. avoid physical disk reads.

    Your hard drives are the slowest components on your system by several orders of magnitude.

    Do everything you can to design for the use of the system and database caches. This will speed up everything. This means lots of memory dedicated to SQL Server and correct indexing of all search fields.

    And no correlated sub-queries - period.

    LC

    Interest Thing you’re proposing: Not to use the database at all, just cache. But how? And what if you don’t have enough memory? I encourage you to write an article about that.

    Alberto De Rossi
    Microsoft Certified Solutions Associate - SQL Server
    Microsoft MVP - Data Platform
    Power BI User Group Lima - Community Leader