SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Количество JOIN в select



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
stn
Участник
Участник



Joined: 18 Jan 2008
Posts: 31

PostPosted: Fri Oct 10, 2008 12:39 pm    Post subject: Количество JOIN в select Reply with quote

Коллеги, сущеcтвует ли ограничение на количество join в селекте?
Back to top
View user's profile Send private message
Alex80
Старший специалист
Старший специалист


Age: 43
Joined: 24 Jan 2008
Posts: 129

PostPosted: Fri Oct 10, 2008 5:50 pm    Post subject: Re: Количество JOIN в select Reply with quote

stn wrote:
Коллеги, сущеcтвует ли ограничение на количество join в селекте?
Quote:
On the left-hand side, either a single database table, a view dbtab_left, or a join expression join can be specified. On the right-hand side, a single database table or a view dbtab_right as well as join conditions join_cond can be specified after ON. In this way, a maximum of 24 join expressions that join 25 database tables or views with each other can be specified after FROM.
Back to top
View user's profile Send private message
XXX_:)
Аналитик
Аналитик


Age: 40
Joined: 01 Feb 2008
Posts: 387
Location: Воронеж

PostPosted: Fri Oct 10, 2008 5:51 pm    Post subject: Reply with quote

Из хелпа:
Quote:
On the left-hand side, either a single database table, a view dbtab_left, or a join expression join can be specified. On the right-hand side, a single database table or a view dbtab_right as well as join conditions join_cond can be specified after ON. In this way, a maximum of 24 join expressions that join 25 database tables or views with each other can be specified after FROM.


лично я никогда не злоупотребляю. Помню тесты проводили, что быстрее работает большие join или несколько select с последующей обработкой во внутренних таблицах. так вот join проиграл.

_________________
Hормальные люди делают вещи намного более безумные чем всё, что делают сумасшедшие (c) С.Лем
Back to top
View user's profile Send private message Blog
Armann
Модератор
Модератор



Joined: 01 Jan 2008
Posts: 422
Location: Moscow

PostPosted: Sat Oct 11, 2008 11:04 am    Post subject: Reply with quote

XXX_:) wrote:
лично я никогда не злоупотребляю. Помню тесты проводили, что быстрее работает большие join или несколько select с последующей обработкой во внутренних таблицах. так вот join проиграл.

поддерживаю... после того как попытаешься отладить селект с десятком джоинов и кроме того обеспечить приемлемую скорость выполнения - как то начинаешь переосмысливать подход к программированию Smile
Back to top
View user's profile Send private message Blog
mike1
Модератор
Модератор



Joined: 22 Nov 2007
Posts: 82

PostPosted: Sat Oct 11, 2008 12:45 pm    Post subject: Reply with quote

На практике сложилось правило "больше трех не собираться". Четвертая таблица в джоине обычно резко просаживает скорость запроса.
Одна из причин этого имхо поле мандант в неюникодовых системах это целых 3 байта, на юникодовых (в моем случае) 9 знаков.
Back to top
View user's profile Send private message
stn
Участник
Участник



Joined: 18 Jan 2008
Posts: 31

PostPosted: Sat Oct 11, 2008 4:52 pm    Post subject: Reply with quote

А если все объединения по полному ключу?
Много (Cool JOIN потребовалось для связи таблиц VBAK, VBAP, LIKP, LIPS, VBRK, VBRP через VBFA.

Например, решил пользователь сделать ограничение по Счету- фактуре, так что, сначала тащить все ордера, поставки, а потом фильтровать по фактуре? Не очень ли большой трафик получится?
Back to top
View user's profile Send private message
Armann
Модератор
Модератор



Joined: 01 Jan 2008
Posts: 422
Location: Moscow

PostPosted: Sun Oct 12, 2008 9:58 am    Post subject: Reply with quote

stn wrote:
А если все объединения по полному ключу?
Много (Cool JOIN потребовалось для связи таблиц VBAK, VBAP, LIKP, LIPS, VBRK, VBRP через VBFA.

Например, решил пользователь сделать ограничение по Счету- фактуре, так что, сначала тащить все ордера, поставки, а потом фильтровать по фактуре? Не очень ли большой трафик получится?

сначала тащить нужные фактуры, потом к ним заказы и тд. В чем проблема то? Smile
Back to top
View user's profile Send private message Blog
stn
Участник
Участник



Joined: 18 Jan 2008
Posts: 31

PostPosted: Mon Oct 13, 2008 12:58 pm    Post subject: Reply with quote

Armann wrote:
сначала тащить нужные фактуры, потом к ним заказы и тд. В чем проблема то? Smile


Я как-то об этом не подумал Crying or Very sad
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.