jwu1023
Member
Dear all,
I have a VB.Net application, which allows users to enter lots of data into a event table. Now the table is not larger. But later on it will become a huge table. My project now is creating a exactly same table as the current event table, and we will move more than 2-year-old data from current event table to the history table. I have to alter all the related programs to allow searching data in either one table. I have two strategies about the searching as following:
1. First search the current event table, if nothing found, then search the history event table.
I thought it is faster because most time our users only care about the recent data. And also it doesn't matter which year data is history table.
The drawback is when users search using wildcard, I have to union the searching results from both table.
2. Union the current event table and history event table, and then search the union table.
Because of the same reason that users most likely care about the recent data, most time searching the union table is costly and unnecessary. There is no problem for wildcard search issue.
Do you think my thought is right or not? I prefer to use the first strategy. Or do you have other better solution? Thanks a lot in advance.
jwu1023
I have a VB.Net application, which allows users to enter lots of data into a event table. Now the table is not larger. But later on it will become a huge table. My project now is creating a exactly same table as the current event table, and we will move more than 2-year-old data from current event table to the history table. I have to alter all the related programs to allow searching data in either one table. I have two strategies about the searching as following:
1. First search the current event table, if nothing found, then search the history event table.
I thought it is faster because most time our users only care about the recent data. And also it doesn't matter which year data is history table.
The drawback is when users search using wildcard, I have to union the searching results from both table.
2. Union the current event table and history event table, and then search the union table.
Because of the same reason that users most likely care about the recent data, most time searching the union table is costly and unnecessary. There is no problem for wildcard search issue.
Do you think my thought is right or not? I prefer to use the first strategy. Or do you have other better solution? Thanks a lot in advance.
jwu1023