Inner join in how many tables
hi All
how many tables join thu inner join.
Hi,
You can join any number of tables as long as join conditions exist between the tables. It is not advisable to use more than 4 tables in join. it results in performance issue.
thanks,
sksingh
Similar Messages
-
Inner Join. How to improve the performance of inner join query
Inner Join. How to improve the performance of inner join query.
Query is :
select f1~ablbelnr
f1~gernr
f1~equnr
f1~zwnummer
f1~adat
f1~atim
f1~v_zwstand
f1~n_zwstand
f1~aktiv
f1~adatsoll
f1~pruefzahl
f1~ablstat
f1~pruefpkt
f1~popcode
f1~erdat
f1~istablart
f2~anlage
f2~ablesgr
f2~abrdats
f2~ableinh
from eabl as f1
inner join eablg as f2
on f1ablbelnr = f2ablbelnr
into corresponding fields of table it_list
where f1~ablstat in s_mrstat
%_HINTS ORACLE 'USE_NL (T_00 T_01) index(T_01 "EABLG~0")'.
I wanted to modify the query, since its taking lot of time to load the data.
Please suggest : -
Treat this is very urgent.Hi Shyamal,
In your program , you are using "into corresponding fields of ".
Try not to use this addition in your select query.
Instead, just use "into table it_list".
As an example,
Just give a normal query using "into corresponding fields of" in a program. Now go to se30 ( Runtime analysis), and give the program name and execute it .
Now if you click on Analyze button , you can see, the analysis given for the query.The one given in "Red" line informs you that you need to find for alternate methods.
On the other hand, if you are using "into table itab", it will give you an entirely different analysis.
So try not to give "into corresponding fields" in your query.
Regards,
SP. -
How many tables are in my database
I wanted to check how many tables I have so I ran the following query to list all of the tables in all of the tablespaces.
select t.table_name, df_name from dba_tables t, v$tablespace df
where t.tablespace_name = df.name;
I got back 34377 tables or records.
but if I wanted to count the number of tables I have I could run the following command.
SQL> select count(*) from dba_tables;
I got back 34700 tables.
Can anyone tell me why these numbers don't match or what I am missing here?Also you can try to count them regarding to your tablespace which is better
SELECT COUNT(*),tablespace_name FROM USER_TABLES group by tablespace_name;also Laurent Schnieder provide with way that you count your tables in specific schema like the following :
SQL> select
2 table_name,
3 to_number(
4 extractvalue(
5 xmltype(
6 dbms_xmlgen.getxml('select count(*) c from '||table_name))
7 ,'/ROWSET/ROW/C')) count
8 from user_tables;http://www.dba-oracle.com/t_count_tables_schema.htm -
Inner Join between two big tables
Hi There,
I have a situation where in which I have to write an inner join between two table of the order of (30k to 60 rows).
My query is as simple as,
select A.a,B.b from A ,B where A.a = B.b;
N.B: a and b are of type varchar
But the problem is it takes nearly 15 mins to run. Is there any better way of doing an inner join between such bigger tables?
Thanks,
Jose John.Thank you all for your help.....Indexing works....:)
--JJ -
How to check how many tables used in one particular program
Hi Gurus,
I am wondering how to check for how many tables are used for one particular program whether its a custom (Y* or Z* program) or
a sap program (R*) .I have tried ST05 .But its not satisfactory .Could u help me plz in this regard .
Thanks in Advance !!!!!!!!hi,
Go with the transaction se80
select type as the Progarm
in the below block provide your program name.....
there u can find the drop down of your object related tables, types, fields, etc.....go with the tables u can find the respective information of the tables....
or
go with the se30
and enter the program name...
and go with the trips and tricks....
u can find the drop down of the
abap objects performanceexamples....
and go with the required thing.....
then u can find the required....
Cheers,
Brahma -
How many tables can i create in Oracle 10g ?
hi every body !
how many tables can create in oracle 10g ?
thank you !Unlimited
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14237/limits003.htm -
How many tables are created in Master data loading ( Including hierchy )
hi ,
Please anybody , can you tell us how many tables are created in Master data loading ( Including hierchy )
thanks
PhaniHi PP,
Depending upon the definition of an infoobject, the tables are created when the objects are activated.
/BI<C OR DIGIT>/<TABLE CODE><INFOOBJECT>
<C or digit>: C = Customer-defined InfoObjects
digit = SAP-defined InfoObjects
<table code>: S = SID table
T = Text table
P = Time-independent master data attributes
Q = Time-dependent master data attributes
M = Union of time-dependent and time-independent master
data attributes
X = SID table for time-independent navigational attributes
Y = SID table for time-dependent navigational attributes
H = Hierarchy table
K = Hierarchy SID table
I = Hierarchy SID structure table
J = Hierarchy interval table
Thnaks...
Shambhu -
How do i know in how many tables particular column exists
i want to know in how many tables a particular column exists..
what i mean is
let us assume that there is a Column ABC in table SERVICE.
this particular ABC column is there in some other tables REQUEST,HHG,SS.... and so on
what exactly my query is..
how can i know where all in the database the column ABC is used..
i mean i want to get all the table names using this column ABC.
hope i am clear with my doubt..
thanks for the replies in advanceIf I understand the question
SELECT owner, table_name
FROM dba_tab_cols
WERE column_name = 'ABC'Of course, depending on the requirements, you could use the ALL_TAB_COLS or USER_TAB_COLS tables as well.
Justin -
How many tables ll be created by default
Hi,
I would like to know how many tables ll be created by default in RDBMS, when a classic planning application is created.
Thank you.9.3.1 - 83 tables
11.1.2 - 106 tables
HTH-
Jasmine. -
How many table are affected when sales order creation(O2C)
Hi all,
HOw many table are affected when sales order creation, can any one please help ,and please give me a description indepth please please. I know some of the table affected
Thanks&Regrads,
SuryaHi Kantur Shekar madhuri,
Would you confirm the whether in your schedule line category is activated for "Product Allocation" or not.
if not please activate and re run your scenario.
Regards
Arun -
How many tables can be created under one user's account?
Hi everyone,
I am a newer, I was wondering how many tables can be created under one user's account? Is there a number of tables limitation for the whole system?
Thanks
Jun ChenThe answer is that Oracle imposes no limit on the number of tables that can be created in a single schema. Whatever limits exist are imposed by the hardware and kernel resource limits of a given configuration.
Russ -
How to use Inner Join for these 4 table's
Hi Guys,
My Requirement is i have to get the data into the final Internal table whose structure is like this (BWKEY type MBEW-BWKEY,
MATNR type MBEW-MATNR,
MAKTX type MAKT-MAKTX,
BWTTY type MBEW-BWTTY,
BWTAR type MBEW-BWTAR,
MEINS type MARA-MEINS,
BKLAS type MBEW-BKLAS,
VPRSV type MBEW-VPRSV,
STPRS type MBEW-STPRS,
PEINH type MBEW-PEINH,
CRCY(3) type c,
LBKUM type MBEW-LBKUM,
SALK3 type MBEW-SALK3,
LAEPR type MBEW-LAEPR,
J_3ADEFSI type MARC-J_3ADEFSI,
J_4kDEFSC type MARC-J_4kDEFSC,
SCLAS type MARA-/AFS/SCLAS,
EKALR type MBEW-EKALR,
HKMAT type MBEW-HKMAT,
HRKFT type MBEW-HRKFT,
KOSGR type MBEW-KOSGR,
PRCTR type MARC-PRCTR,
MMSTA type MARC-MMSTA,
SOBSK type MARC-SOBSK,
PPRDL type MBEW-PPRDL,
LPLPR type MBEW-LPLPR,
PPRDZ type MBEW-PPRDZ,
ZPLPR type MBEW-ZPLPR)
from 4 table's MBEW , MARA MAKT and MARC.
Can anybody provide the logci for this based on the below requirement
"Go to table MBEW with material number, plant and valuation type; fetch the information laid out in output format. There are some fields which need to come from tables MARC, MARA and MAKT. The common criterion is material number across these tables.
MBEW-MATNR = MARC-MATNR
MBEW-MATNR = MARA-MATNR
MBEW-MATNR = MAKT-MATNR
Thanks,
Gopi.Hello Gopi,
I did not have system now and just written in notepad..
types : begin of ty_mbew ,
MATNR type MBEW-MATNR,
BWTTY type MBEW-BWTTY,
BWTAR type MBEW-BWTAR,
MEINS type MARA-MEINS,
BKLAS type MBEW-BKLAS,
VPRSV type MBEW-VPRSV,
STPRS type MBEW-STPRS,
PEINH type MBEW-PEINH,
CRCY(3) type c, " What is this field ,i did not include in join
LBKUM type MBEW-LBKUM,
SALK3 type MBEW-SALK3,
LAEPR type MBEW-LAEPR,
J_3ADEFSI type MARC-J_3ADEFSI,
J_4kDEFSC type MARC-J_4kDEFSC,
SCLAS type MARA-/AFS/SCLAS,
EKALR type MBEW-EKALR,
HKMAT type MBEW-HKMAT,
HRKFT type MBEW-HRKFT,
KOSGR type MBEW-KOSGR,
PRCTR type MARC-PRCTR,
MMSTA type MARC-MMSTA,
SOBSK type MARC-SOBSK,
PPRDL type MBEW-PPRDL,
LPLPR type MBEW-LPLPR,
PPRDZ type MBEW-PPRDZ,
ZPLPR type MBEW-ZPLPR,
end of ty_mbew.
types : begin of ty_makt ,
matnr type makt-maktx,
MAKTX type MAKT-MAKTX,
end of ty_makt.
types : begin of ty_final ,
MATNR type MBEW-MATNR,
MAKTX type MAKT-MAKTX,
BWTTY type MBEW-BWTTY,
BWTAR type MBEW-BWTAR,
MEINS type MARA-MEINS,
BKLAS type MBEW-BKLAS,
VPRSV type MBEW-VPRSV,
STPRS type MBEW-STPRS,
PEINH type MBEW-PEINH,
CRCY(3) type c,
LBKUM type MBEW-LBKUM,
SALK3 type MBEW-SALK3,
LAEPR type MBEW-LAEPR,
J_3ADEFSI type MARC-J_3ADEFSI,
J_4kDEFSC type MARC-J_4kDEFSC,
SCLAS type MARA-/AFS/SCLAS,
EKALR type MBEW-EKALR,
HKMAT type MBEW-HKMAT,
HRKFT type MBEW-HRKFT,
KOSGR type MBEW-KOSGR,
PRCTR type MARC-PRCTR,
MMSTA type MARC-MMSTA,
SOBSK type MARC-SOBSK,
PPRDL type MBEW-PPRDL,
LPLPR type MBEW-LPLPR,
PPRDZ type MBEW-PPRDZ,
ZPLPR type MBEW-ZPLPR,
end of ty_final.
Internal tables
data :i_mbew type standard table of ty_mbew,
i_makt type standard table of ty_makt,
i_final type standard table of ty_final.
Work Areas
data : wa_mbew like line of i_mbew,
wa_makt like line of i_makt,
wa_final like line of i_final.
start-of-selection.
get the data from MBEW,MARA,MARC Table
select aMATNR aBWTTY
aBWTAR bMEINS
aBKLAS aVPRSV
aSTPRS aPEINH
*CRCY(3) type c,
aLBKUM aSALK3 a~LAEPR
c~J_3ADEFSI type MARC-J_3ADEFSI,
c~J_4kDEFSC type MARC-J_4kDEFSC,
b~SCLAS type MARA-/AFS/SCLAS,
aEKALR aHKMAT
aHRKFT aKOSGR
cPRCTR cMMSTA
cSOBSK aPPRDL
aLPLPR aPPRDZ
a~ZPLPR into corresponding fields of table i_mbew
from mbew as a inner join mara as b on bmatnr = amatnr
inner join marc as c on cmatnr = amatnr.
if sy-subrc eq 0.
select matnr maktx from makt into table i_makt
for all entries in i_mbew
where matnr = i_mbew-matnr
and spras = sy-langu.
endif.
loop at i_mbew into wa_mbew.
read the data from MAKT Table
read table i_makt into wa_makt with key matnr = wa_mbew-matnr.
if sy-subrc eq 0.
move-corresponding wa_mbew to wa_final.
move wa_makt-maktx to wa_final-maktx.
append wa_final to i_final.
endif.
endloop.
Thanks
Seshu -
Inner Join resulting in many, many duplicates
I ran an Inner Join but it returned many, many duplicates. Any idea why that would occur?
One Answer from a different thread:
Because you may be having improper Join condition what has a One to many or a Many to many relationship between the tables. We do not have the data, and hence cannot comment over it. However, since the original issue is resolved, I suggest you close this thread and ask the question in another thread.
What do I look for to identify an improper join?Please don't start another discussion for the same issue.
Continue on your existing thread where the answers and advice you've already been given can be seen, so that people don't end up giving the same advice you've already had.
Answers on other thread: Inner Join error
Locking this thread -
Multiple inner join ..how they work ?
Here is an example of INNER JOIN.
SELECT whatever
FROM tablea AS a
INNER
JOIN tableb AS b
ON b.b = a.a
INNER
JOIN tablec AS c
ON c.c = b.b1
INNER
JOIN tabled AS d
ON d.d = c.c1As you see there are 3 inner join in a single query ...I'm uncomfortable with this ....because I dont know what is the order of execution of multiple inner joins .
which inner join will be executed first and which is next and which is last ?Hi,
user575089 wrote:
but you know my concern is .... is not the result of inner join is fed to the next inner join ? ( because there is multiple inner join )Sorry, I don't know what your concern is. Try to explain it, prefereably with a concrete example. Post a specific query, using the dept, emp and salgrade tables in the scott schema (or 3 tables for which you post CREATE TABLE and INSERT statements), and a specific question about that query. If you really need 4 tables to show what your problem is, you can use the hr schama instead of scott.Is it possible to test using MySQL ? What happens when you try it?
I know its an oracle forum You're right; this is an Oracle forum.
....that should not be a problem I guess... ..coz SQL is a universal language ...The English language spoken in Britain is different from the English language spoken in the United States. The differences are minor compared to, say, the differences between either and Hindi, but there are differences.
The SQL langauge used in Oracle is different from the SQL language used in MySQL, even more that the English language used in Britain is different from the English language used in the United States.
I'm guessing that how MySQL and Oracle perform inner joins is pretty similar, as far as it matters for your question, but that's just a guess. I don't know a lot about MySQL, and I don't know what your question is. -
Inner join searches too many entries
Hi experts,
In a user exit following code is used:
DATA : h_rsnum LIKE afko-rsnum,
h_charg LIKE resb-charg,
h_matnr LIKE resb-matnr,
SELECT SINGLE rsnum INTO h_rsnum
FROM afko
WHERE aufnr = x_bncom-aufnr.
IF sy-subrc = 0 .
SELECT resbcharg resbmatnr
INTO (h_charg, h_matnr)
FROM mara INNER JOIN resb
ON maramatnr = resbmatnr
WHERE resb~rsnum = h_rsnum
AND resb~charg NE space
AND maramtart = 'HALB' OR maramtart = 'FERT'.
ENDSELECT.
Goal of the source code is to detemine the reservation number of a process order. From table RESB with key h_rsnum, the material nb and the batch nb of the single material with material type HALB or FERT needs to be selected.
During debugging I found out that this code searches into a very long list of materials before ending up with the correct h_charg and h_matnr.
If the condition resb~rsnum = h_rsnum would be taken into account when creating the inner join, the list would only contain 20 materials maximum.
Can this behaviour be changed and how to do it?
Rgds,
Suzyif this is inside a user exit 1st of all why are you using a select endselect and i dont see you take that in to a table which means your only looking for one record.
about you tell that before the inner join taking the where condition into consideration. I dont think it will be possible sine normally after making the join it should go for the where condition anyway ill try to check on it and see.
sometimes Siegfried might know an answer dont know if he saw this.
Nafran
Edited by: Nafran Shiraz on Jun 4, 2009 12:36 PM
Maybe you are looking for
-
HOW TO DISPLAY VENDOR WITH NO OPEN CLEARED ITEMS
Hi All, We want to delete some of the vendors which do not have any open or cleared items. Can anyone tell me the report ,T Code or ant table which we can run to display the vendors with no open ,clear items.
-
How can i change my old email address to my new email address
how can i change my old email address to my new email address need help please everything i try want work
-
Yosemite: Saved search from Spotlight does not work the same
Hi, I have various Logic Pro folders throughout my computer and want to create a Saved Search that brings all and only the Logic project files together into one place. There's a couple of catches: the Logic file extension has changed over the years w
-
Facing problem in display of measure with property "hide can be shown"
Hi Experts, Am facing a strange problem in BEx Analyzer. I have used a global structure with formulaes & Selections. For few formules i have used Display option as "hide can be shown". when i open the report in Analyzer and perform drilldown on line
-
IPHONE SDK FOR DEVELOPERS.
Hi Mates, After many trials, I managed to download the iPhone SDK. I have the following folders : AccelerometerGraph, BubbleLevel, CryptoExercise, HelloWorld, PVRTextureLoader, SpeakHere, TouchCells, UICatalogue. I am not sure if all the folders were