instead, each record has a status and a version #
For inserts:
- add parent
- add children
- set children status to active
- set parent status to active
- insert parent w/ higher version #
- insert children w/ higher version #
- set children status to active
- set parent to active
Tip #2: no joins allowed
Use lots of tables instead (easier to partition)
Joins can easily overload a database.
Offload logic to easily load balanced app servers
db is just data in and out
db is just data in and out
Tip #3: Limit # of returned rows using where clause
>20,000 rows returned is threshold
100k allowed in some cases
Even if you could get 100k results, probably can't process them.
>20,000 rows returned is threshold
100k allowed in some cases
Even if you could get 100k results, probably can't process them.
No comments:
Post a Comment