Number of tables is 2,147,483,647 ?

질문 Number of tables is 2,147,483,647 ?

  • Tuesday, April 23, 2013 6:57 PM
     
     

    Hello

    I read http://msdn.microsoft.com/en-us/library/ms143432(v=sql.100).aspx

    it say that number of objects can be 2,147,483,647. it means that i can create a lot of tables untill 2,000,000,000

    I have two table. one is that users table. second table is that userrecords table.

    For example at scenario.

    1-)I have 100,000 users. per user have 100,000 records. so userrecords table will have 100,000x100,000 = 10,000,000,000 rows or records.

    second scneario

    2-)I have 100,000 users. and i have 100,000 tables for per userid. each table have 100,000 records.

    3-) there is only one table that have 100,000 records.

    Which query work fast more at below ? 2 scneario and 3 scneario same ? or 3scneario is more fast ? 1 scneario and 2 scneario same. or 2 scneario is more fast ?

    1-)Scnerio 1 "SELECT columnameA, columnameB From userrecords(there are one table) WHERE date<=@datemax and date >=@datemin and userid=45,000

    return records count is 300.  

    2-)Scenario 2 "SELECT columnameA, columnameB From tableuserid(table45,0000)(there are 100,000 tables) WHERE date<=@datemax and date >=@datemin

    return records count is 300.

    3-)-)Scenario 3 "SELECT columnameA, columnameB From tableA(there are only onetable that tableA) WHERE date<=@datemax and date >=@datemin

    Note: column have index that be after WHERE conditons.



    • Edited by MSDN.CSharp Tuesday, April 23, 2013 6:59 PM
    • Edited by MSDN.CSharp Tuesday, April 23, 2013 7:01 PM
    •  

All Replies

  • Tuesday, April 30, 2013 9:03 AM
     
     

    Hi,

    You may consider table partitioning and your query will use partition elimination by default in case of enterprise edition. If you are not running enterprise editon a DPV can be your solution.

    I hope it helps.

    Janos


    There are 10 type of people. Those who understand binary and those who do not.

    My Blog | Hire Me