I'm evaluating performance issues in a data entry application using c# (VS 2005), framework 2.0 with ORACLE 11. The application is being used by more than 120 people online. Basically the task is simple, only verify salary data in papers and then write them in a database. To valid data, the user most verify employee identification ID or first name or last name in a large database (5 Million). Sometimes during the task, the application blocks for a moment (seconds to a few minutes), making impossible to continue working. This issue lacks productivity and is producing significant delays on work planning.
The application (3 layer: frontend, middle tier and backend) is using main tables to validate the data and gridviews to add, modify or delete data. By the moment, no IT renovation is possible.
First question: Im wondering if is good practice to use views instead of main tables to reduce overhead and application blocks?
Queries to search data are:
To search by EmployeeID:
SELECT name FROM employees WHERE id = EmployeeID OR af = EmployeeID;
(only id field is PK, af field correspond to other identification number but no everyone have it)
To search by name:
SELECT id, DECODE(complete_name, null, name_null) name, first_name, last_name, sex FROM employees WHERE name_null LIKE CONVERT(REPLACE'" + first_name.ToUpper() + "%" + last_name.ToUpper() + "%" + "','Ñ','N'),'US7ASCII')" OR name_null LIKE CONVERT(REPLACE'" + last_name.ToUpper() + "%" + first_name.ToUpper() + "%" + "','Ñ','N'),'US7ASCII')";
This two queries are created in functions, so data is returned by demand. Then data is showed in DataGrids to user.
Second question: If there are other ways to optimize the queries, considering the facts presented?
Thank you for any tip.