database - mysql multiple table/multiple schema performance -


a quick bit of background - have table "orders" has 10k records written per day. queried table in database. keep table small plan move records written week or ago different table. done automated job. while understand make sense pop history off separate server have single db server.

the orders table in databasea. following approaches considering:

  1. create new schema databaseb , create orders table contains history?
  2. create table ordershistory in databasea.

it great if pointers design give better performance?

edit:

better performance

  1. querying current orders - since not weighed down past data
  2. querying history

i take question want deal current orders.

in past, have used 3 tables on busy sites

new orders, processing orders, filled orders,

and main orders table

orders

all these tables have relation orders table , primary key.

eg new_orders_id, orders_id processing_orders_id, orders_id ....

using left join find new , processing orders should relatively efficient


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -