开发者

Limiting number of rows in a table

My table contains around 16 columns. I want to limit number of rows at 10000. I can :

  1. Insert only if current size le开发者_运维问答ss than 10000.
  2. Put a configuration limit (either through some external configuration file or through some dynamic parameter) on the maximum number of rows.

I prefer option 2 because reduced effort checking size for every insert (my table is insert intensive, reading is occasional). It would be useful if this limit can be dynamically set (for example using an sqlite3_limit() -like API), but an /etc/* -like configuration file too would do.

Is this possible on SQLite 3.7.7.1 and Linux (SLES 11)?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜