Search the value in all fields [message #264252] |
Sun, 02 September 2007 07:13 |
VVince
Messages: 2 Registered: September 2007
|
Junior Member |
|
|
Hello !
I am dealing with the database structure that consists of several tables (about 30). The task is to find records that contain the specified value. The column name and table name that contain this value for sure are not specified. My solution was to create SQL query for all possible columns and tables that contists of multiple SQL blocks that are similar to each other and are connected by 'UNION'. As the result of it the query becomes huge and performance suffers a lot. So can you please tell be what could be the less resource consuming solution and what concrete features of oracle can be used to improve performance.
Thanks.
|
|
|
|
Re: Search the value in all fields [message #264296 is a reply to message #264252] |
Sun, 02 September 2007 22:54 |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
My suggestion would be to sort out your table design. If you have to search through all columns in all tables (which is what the wording of you question implies) then there is something woefully wrong with your design.
|
|
|
|
Re: Search the value in all fields [message #264355 is a reply to message #264252] |
Mon, 03 September 2007 01:47 |
VVince
Messages: 2 Registered: September 2007
|
Junior Member |
|
|
This structure was designed so to provide audit trail possibility for multiple entities that are represented by the corresponding data tables. Every modification of these tables is reflected in their copies, which are connected with one extra table in relation 1:1. This extra table has information about the parameters of changes(DateTime, User, ...). And the mentioned above query must search for the changes (resulting information received by joining the entity copy table with the extra table) that include the specified value, but user may not specify the column to search this value.
|
|
|