Hi guys, i have a doubt (big).
Lets take as example a database for, dunno, a whatever company's orders.
Lets say that this company make around 2000 orders per month, so, around 24K order per year, and they dont ant to delete any order, even if 5 years old (hey, this is an example, numbers dont mean anything:)
In the meaning of have a good database query speed, its better have just one table, or will be faster having a table for every year?
My idea was to create a new table for the orders each year, calling such orders_2008, orders_2009, etc..
Can be a good idea to speed up db queryes?
usually the data that are used are those of the current year, so there are less lines the better is.. Obviously, this would give problems when I search in all the tables of the orders simultaneously, becose should I will to run some complex UNION .. but this happens in the normal activities very rare.
I think is better to have an application that for 95% of the query is fast and the remaining somewhat slow, rather than an application that is always slow.
My actual database is on 130 tables, the new version of my application should have about 200-220 tables.. of which about 40% will be replicated annually.
Any suggestion?
EDIT: the RDBMS will be probably Postgresql, maybe (hope not) Mysql
p.s: i home my english is good enaught to explain my needs.. and the one who will edit that will be plenty ;)