请教一个数据库的问题,综合考虑各种因素,运行速度等。
If I have a display item to display 2 columns in 2 table: display item = col1||col2. Which way is better?
1. use PL/SQL in application to get those 2 columns.
select table1.col1||table2.col2
into display_item
from table1, table2
2. Create a view which combines those 2 column, and simply
select view.column
into display_item
from view.
I think if I have a huge table, No1 will take more time since it need to search 2 tables in front end. No2 is doing back end, it should take less time. Am I right? Thanks for any comment!
