Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Performance impact using a VIEW UNION ALL

Performance impact using a VIEW UNION ALL

From: Ron C. <rcalvane.nospamme_at_writeme.com>
Date: 1998/02/11
Message-ID: <34e1c877.6481380@news.voyager.net>#1/1

A current application (not designed by me) breaks up a logical business listing table into 40 physical Oracle tables based upon business type ( repeat, I did not design this)

I want to create a VIEW that will allow me to search for a business name in all 40 tables with a single query. There are about 3 million rows in total across all 40 tables.

I would create the view as:  

select....
UNION ALL
select...
etc.

Does anyone know if a query such as the following with result in full table scans even if there are indexes on the columns of each table? Or will the individual indexes from each table be used? Will this kind of query perform ok?

SELECT business_name, city, state
FROM MY_40_TABLE_VIEW
WHERE upper(business_name) LIKE upper('%Bar and Grill%') AND STATE = 'NY'; Please remove the 'nospamme' inserted that may be inserted by my newgroup reader if you reply by email.
Thanks,
Ron Received on Wed Feb 11 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US