Hello Friends ,
I think little bit confusion arise in previous tar of uninon operator .
Now let me simplyfy my requirement .
We have 110 different tables , all of these tables column names,datatype and field width are same.
Now when user do a query this query should point all tables
and out of which query retrieves only 25 rows .
No matter how many rows are retrieved from one table .
So query is going to point all tables but we need only 25 rows
in response .
I dont want to stik with union operator .
Just i want to know how will this possible . Database is of 3 terabytes , so also how can i get better performance .
First, please try to stay in the same thread, so others can follow the entire thought process.
Now, to continue with the thread....
You have raised more questions than you answered.
First, why in the world do you have 110 tables with the exact same structure? What do they contain? That is *very, very, very* odd.
Again, your requirement is also exceeedingly odd and *really* does not sound correct. I mean, if you have 110 tables and are only getting 25 rows ever, then why even query them all? You can't possibly get rows from more than 25 of them. If that's true, then why query more than 1? Why not just grab 25 records from the first table? What would the difference be?
I'm sorry, but this is really, truly, a very extreme circumstance you are describing. I'm afraid more clarification is still necessary. It just sounds wrong - sorry.
Also, assuming that, somehow, 110 tables with the same structure actually *is* the correct model, the requirement still seems wrong. Shouldn't we care what 25 records are show? Is this actually a 'windowing' requirement as I described in the previous post?
I agree with Chrisrlong.
Is this an OLTP? or a Datawarehouse? what is the db block sizes? What version of Oracle db?
I have seen where you can build a select statement using rownum rank in the latest version of Oracle 8i on Sun, I think it was first avaible on release 8.1.6.x. That could possibly help but there are still lots of unknowns.
[Edited by rcherch on 06-05-2001 at 08:14 AM]
Click Here to Expand Forum to Full Width