SQL Server 2000 Perforamance Question - Large Table
Have a larg开发者_开发技巧e table that is fast approaching 11 million records. (20 columns in the table).
My question is, is there a performance issue that I should be thinking about in terms of the Number of rows in a table?
Cheers
It depends on how the data in the table is used. Are there a lot of reads, a lot of writes? Is the data stored and never updated, etc.
Without more info, the answer is "most likely"
depends on your primary key and how u use it. if most of the time, data is accessed only by pk and pk is basic number type(integer) it will be usual fast.
but if u use where condition maybe u need to tune it up. performance tuning is based on how u query it.
here's my tips
- equal operator(=) provide best performance.
- or operator sometime slower performance. separate into 2 query and union it maybe faster.
select * from tableA where a = 'aaa' union select * from tableA where a = 'bbb'
As others have commented there's nothing particularly huge about 11 million records and usage is pretty important but what's probably more important is table growth.
If your growth is ~110K daily (or 1% daily) you'll be able to monitor performance comfortably before you'll have to start needing to address problems by upping execution timeout values, reworking queries or taking more drastic measures like upgrading hardware, SQL Version or database sharding.
However if you growth is significantly higher, e.g. ~1.1 Million records daily, than you'll need to start planning very soon, because its likely that you'll start encountering issues at an uncomfortable pace.
精彩评论