Make your own free website on Tripod.com

InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InstantDB: Number of Tables in From_Clause?


Dear Peter
>
>Enclosed you find the code for my tests.
>
> I hope, it give a solution for this problem.
> I wait on your response, and I thank you in advance Peter.
>
>Regards
>Fadoua


----- Original Message -----
From: Peter Hearty <peter.hearty@lutris.com>
To: <instantDB@enhydra.org>
Sent: Monday, June 12, 2000 6:41 PM
Subject: Re: InstantDB: Number of Tables in From_Clause?


> Fadoua
>
> Do you have a sample piece of code that illustrates this?
>
> Regards
>
> Peter Hearty
> Lutris Technologies UK Ltd.
> -----Original Message-----
> From: Fadoua Ouerdiane <ouerdiane@internolix.com>
> To: instantDB@enhydra.org <instantDB@enhydra.org>
> Date: 12 June 2000 15:43
> Subject: InstantDB: Number of Tables in From_Clause?
>
>
> How many Tables does InstantDB support in From_Clause ?
>
> It seems not to function, wenn the From_Clause contains more than 9
Tables.
>
> I appreciate your help and thank you in advance .
>
> with best regards
>
> Fadoua
>
> ============================
> Dipl.-Inf. Fadoua Ouerdiane
> Manager
>
> Internolix Tunisia
> Immeuble l'arche du lac 2eme etage
> 2045 les berges du lac deTunis
> Tel: +216 [0] 1 960 599
> Fax: +216 [0] 1 960 576
> email: internolix.gnet.tn
>
>
> --------------------------------------------------------------------------
---
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe instantdb" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-instantdb@enhydra.org.
>
{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1036{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f16\froman\fcharset238\fprq2 Times New Roman CE;}{\f17\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f19\froman\fcharset161\fprq2 Times New Roman Greek;}{\f20\froman\fcharset162\fprq2 Times New Roman Tur;}{\f21\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f28\fmodern\fcharset238\fprq1 Courier New CE;}{\f29\fmodern\fcharset204\fprq1 Courier New Cyr;}{\f31\fmodern\fcharset161\fprq1 Courier New Greek;}{\f32\fmodern\fcharset162\fprq1 Courier New Tur;}{\f33\fmodern\fcharset186\fprq1 Courier New Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\nowidctlpar\widctlpar\adjustright \fs20\lang1036\cgrid \snext0 Normal;}{\*\cs10 \additive Default Paragraph Font;}}{\info{\operator INTERNOLIX}{\creatim\yr2000\mo6\dy13\hr18\min31}{\revtim\yr2000\mo6\dy13\hr19\min28}{\version2}{\edmins3}{\nofpages6}{\nofwords2827}{\nofchars16116}{\*\company  }{\nofcharsws19791}{\vern73}}\margl1417\margr1417\margt1417\margb1417 \endnotes\aendnotes\aftnstart0\hyphhotz0\aftnnar\lytprtmet\hyphcaps0\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot \fet0\sectd \linex0\headery709\footery709\colsx709\endnhere\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \nowidctlpar\widctlpar\adjustright \fs20\lang1036\cgrid {\f2 *************************************************************************************************************
\par ******************** }{\b\f2 This is the original Select_statement: with 11 tables, 3 Subselects}{\f2 
\par ******************** 
\par ******************** resultset = null ====> }{\b\f2\cf6 not correct
\par }{\f2 ******************** Execution_Time : }{\b\f2\cf14 very fast}{\f2 
\par ************************************************************************************************************
\par SELECT  1,  price.salesqty_factor,  0,  price.price,  price.special_price,  price.discount,  price_list.special_offer,  price_list.discount,  price_list.description,  price_list.matchcode,  price_list.incl_vat,  art_custgroup.discount_allowed,  art_custgroup.discount,  art_custgroup.min_order_qty,  art_custgroup.max_order_qty,  article.article_key,  article.article_no,  vat_detail.vat,  0,  article_desc.matchcode,  article_desc.matchcode,  article_desc.short_text,  category_article.display_sequence  }{\f2\cf5 FROM category, category_article, article, vat, vat_country,  vat_detail, art_custgroup, price_list, price, article_desc, basket  }{\f2 WHERE category.cat_key       = 1 AND   category.record_status < 3 AND   category_article.cat_fkey      = category.cat_key AND   category_article.record_status < 3 AND   article.article_key   = category_article.article_fkey AND   article.record_status < 3 AND   vat.vat_key       = article.vat_fkey  AND   vat.record_status < 3 AND   vat_country.vat_fkey      = vat.vat_key  AND   vat_country.country_fkey  = basket.country_fkey  AND   vat_country.record_status < 3 AND   vat_detail.vat_fkey      = vat.vat_key  AND   vat_detail.country_fkey  = vat_country.country_fkey  AND   vat_detail.record_status < 3 AND   vat_detail.valid_from    = }{\f2\ul\cf2 (SELECT MAX(v2.valid_from) FROM vat_detail as v2 WHERE v2.vat_fkey      = vat_detail.vat_fkey  AND   v2.country_fkey  = vat_detail.country_fkey  AND   v2.valid_from    <= 960477902 AND   v2.record_status < 3)}{\f2  AND   basket.basket_key = '96021412336029069' AND   art_custgroup.article_fkey   = article.article_key  AND   art_custgroup.custgroup_fkey = basket.custom_group_fkey AND   art_custgroup.active         = 1 AND   art_custgroup.record_status  < 3 AND   price_list.article_fkey       = art_custgroup.article_fkey AND   price_list.custgroup_fkey     = art_custgroup.custgroup_fkey AND   price_list.record_status      < 3 AND   price_list.valid_from_changed = }{\f2\ul\cf2 (SELECT MAX(pl2.valid_from_changed) FROM price_list as pl2 WHERE pl2.article_fkey      = price_list.article_fkey AND pl2.custgroup_fkey     = price_list.custgroup_fkey AND pl2.valid_from_changed <= 960477902 AND pl2.record_status      < 3) }{\f2 AND price.article_fkey    = price_list.article_fkey AND price.custgroup_fkey  = price_list.custgroup_fkey AND price.valid_from      = price_list.valid_from AND price.record_status   < 3 AND price.salesqty_factor = }{\f2\ul\cf2 (SELECT MIN(p2.salesqty_factor) FROM price as p2 WHERE p2.article_fkey   = price.article_fkey AND p2.custgroup_fkey  =  price.custgroup_fkey AND p2.valid_from      =  price.valid_from AND p2.record_status   < 3)}{\f2  AND article_desc.article_fkey   = article.article_key AND article_desc.language_fkey = basket.language_fkey AND basket.basket_key = '96021412336029069' ORDER BY 23 
\par 
\par }{\b\f2\cf4 **************}{\b\f2 I have tried to simplify this statement}{\b\f2\cf4 *******************************************************}{\b\f2\cf7  }{\f2\cf7 
\par }{\f2 **********************************************************************************************************
\par ******************** Select with 2 subselect, 5 tables,  without Table_aliasis in the main Select: 
\par ******************** resultset }{\b\f2\cf11 correct
\par }{\f2 ******************** Execution_Time : }{\b\f2\cf14 very fast}{\b\f2\cf11 
\par }{\f2 *********************************************************************************************************
\par 
\par select vat_detail.vat, price_list.special_offer  }{\f2\cf5 from vat_detail, vat, vat_country,price_list, price }{\f2 where vat_detail.vat_fkey      = vat.vat_key  AND   vat_detail.country_fkey  = vat_country.country_fkey AND   vat.record_status < 3  AND   vat_country.vat_fkey      = vat.vat_key  AND   vat_country.record_status < 3 and vat_detail.record_status < 3 AND   vat_detail.valid_from    = }{\f2\cf2 (SELECT MAX(v2.valid_from) FROM vat_detail as v2 WHERE v2.vat_fkey      = vat_detail.vat_fkey  AND   v2.country_fkey  = vat_detail.country_fkey  AND   v2.valid_from    <= 960477902 AND   v2.record_status < 3)  }{\f2 AND   price_list.valid_from_changed = }{\f2\cf2 (SELECT MAX(pl2.valid_from_changed) FROM price_list as pl2 WHERE pl2.article_fkey      = price_list.article_fkey AND pl2.custgroup_fkey     = price_list.custgroup_fkey AND pl2.valid_from_changed <= 960477902 AND pl2.record_status      < 3) }{\f2 AND price_list.record_status      < 3 AND price.article_fkey    = price_list.article_fkey 
\par 
\par 
\par **********************************************************************************************************
\par ******************** Select with 3 subselects, 5 tables,  without Table_aliasis in the main Select: 
\par ******************** resultset }{\b\f2\cf11 correct
\par }{\f2 ******************** Execution_Time : }{\b\f2\cf14 very fast}{\b\f2\cf11 
\par }{\f2 *********************************************************************************************************
\par 
\par select vat_detail.vat, price_list.special_offer  }{\f2\cf5 from vat_detail, vat, vat_country,price_list, price }{\f2 where vat_detail.vat_fkey      = vat.vat_key  AND   vat_detail.country_fkey  = vat_country.country_fkey AND   vat.record_status < 3  AND   vat_country.vat_fkey      = vat.vat_key  AND   vat_country.record_status < 3 and vat_detail.record_status < 3 AND   vat_detail.valid_from    = }{\f2\cf2 (SELECT MAX(v2.valid_from) FROM vat_detail as v2 WHERE v2.vat_fkey      = vat_detail.vat_fkey  AND   v2.country_fkey  = vat_detail.country_fkey  AND   v2.valid_from    <= 960477902 AND   v2.record_status < 3)  }{\f2 AND   price_list.valid_from_changed = }{\f2\cf2 (SELECT MAX(pl2.valid_from_changed) FROM price_list as pl2 WHERE pl2.article_fkey      = price_list.article_fkey AND pl2.custgroup_fkey     = price_list.custgroup_fkey AND pl2.valid_from_changed <= 960477902 AND pl2.record_status      < 3) }{\f2 AND   price_list.record_status      < 3 AND price.article_fkey    = price_list.article_fkey AND price.salesqty_factor = }{\f2\cf2 (SELECT MIN(p2.salesqty_factor) FROM price as p2 WHERE p2.article_fkey   = price.article_fkey AND p2.custgroup_fkey  =  price.custgroup_fkey AND p2.valid_from      =  price.valid_from AND p2.record_status   < 3) 
\par }{\f2 
\par 
\par 
\par ************************************************************************************************************
\par ********************with 3 subselects, 5 tables,  without Table_aliasis in the main Select:}{\b\f2\ul\cf1 Selectlist modified}{\f2 
\par ******************* resultset }{\b\f2\cf11 correct
\par }{\f2 ******************* Execution_Time : }{\b\f2\cf14 fast}{\b\f2\cf11 
\par }{\f2 *************************************************************************************************************
\par select vat_detail.vat, 1,  price.salesqty_factor,  0,  price.price,  price.special_price,  price.discount,  price_list.special_offer,  price_list.discount,  price_list.description,  price_list.matchcode,  price_list.incl_vat }{\f2\cf5 from vat_detail, vat, vat_country,price_list, price }{\f2 where vat_detail.vat_fkey      = vat.vat_key  AND   vat_detail.country_fkey  = vat_country.country_fkey AND   vat.record_status < 3  AND   vat_country.vat_fkey      = vat.vat_key  AND   vat_country.record_status < 3 and vat_detail.record_status < 3 AND   vat_detail.valid_from    = }{\f2\cf2 (SELECT MAX(v2.valid_from) FROM vat_detail as v2 WHERE v2.vat_fkey      = vat_detail.vat_fkey  AND   v2.country_fkey  = vat_detail.country_fkey  AND   v2.valid_from    <= 960477902 AND   v2.record_status < 3)  }{\f2 AND   price_list.valid_from_changed = }{\f2\cf2 (SELECT MAX(pl2.valid_from_changed) FROM price_list as pl2 WHERE pl2.article_fkey      = price_list.article_fkey AND pl2.custgroup_fkey     = price_list.custgroup_fkey AND pl2.valid_from_changed <= 960477902 AND pl2.record_status      < 3) }{\f2 AND   price_list.record_status      < 3 AND price.article_fkey    = price_list.article_fkey AND price.salesqty_factor = }{\f2\cf2 (SELECT MIN(p2.salesqty_factor) FROM price as p2 WHERE p2.article_fkey   = price.article_fkey AND p2.custgroup_fkey  =  price.custgroup_fkey AND p2.valid_from      =  price.valid_from AND p2.record_status   < 3) 
\par 
\par }{\f2 ***********************************************************************************************************
\par ******************** Select with 3 subselects, }{\b\f2 6 tables}{\f2 ,  without Table_aliasis in the main Select:
\par ******************** resultset }{\b\f2\cf11 correct
\par }{\f2 ******************** Execution_Time : }{\f2\cf14 not too }{\b\f2\cf14 fast (15 Sec)}{\b\f2\cf11 
\par }{\f2 **********************************************************************************************************
\par select vat_detail.vat, 1,  price.salesqty_factor,  0,  price.price,  price.special_price,  price.discount,  price_list.special_offer,  price_list.discount,  price_list.description,  price_list.matchcode,  price_list.incl_vat, article.article_key,  article.article_no,  vat_detail.vat,  0 }{\f2\cf5 from vat_detail, vat, }{\b\f2\ul\cf5 article}{\f2\cf5 ,  vat_country,price_list, price }{\f2 where vat_detail.vat_fkey      = vat.vat_key  AND   vat_detail.country_fkey  = vat_country.country_fkey AND   vat.record_status < 3  AND   vat_country.vat_fkey      = vat.vat_key  AND   vat_country.record_status < 3 and vat_detail.record_status < 3 AND   vat_detail.valid_from    = }{\f2\cf2 (SELECT MAX(v2.valid_from) FROM vat_detail as v2 WHERE v2.vat_fkey      = vat_detail.vat_fkey  AND   v2.country_fkey  = vat_detail.country_fkey  AND   v2.valid_from    <= 960477902 AND   v2.record_status < 3)  }{\f2 AND   price_list.valid_from_changed = }{\f2\cf2 (SELECT MAX(pl2.valid_from_changed) FROM price_list as pl2 WHERE pl2.article_fkey      = price_list.article_fkey AND pl2.custgroup_fkey     = price_list.custgroup_fkey AND pl2.valid_from_changed <= 960477902 AND pl2.record_status      < 3) }{\f2 AND   price_list.record_status      < 3 }{\f2\cf2  }{\f2 AND price.article_fkey    = price_list.article_fkey AND price.salesqty_factor = }{\f2\cf2 (SELECT MIN(p2.salesqty_factor) FROM price as p2 WHERE p2.article_fkey   = price.article_fkey AND p2.custgroup_fkey  =  price.custgroup_fkey AND p2.valid_from      =  price.valid_from AND p2.record_status   < 3) }{\f2 AND   article.record_status < 3 AND   vat.vat_key       = article.vat_fkey
\par 
\par ***********************************************************************************************************
\par ******************** Select with 3 subselects, }{\b\f2 7 tables}{\f2 ,  without Table_aliasis in the main Select:
\par ******************** resultset }{\b\f2\cf11 correct
\par }{\f2 ******************** Execution_Time : }{\f2\cf14 not too }{\b\f2\cf14 fast (20 Sec)}{\b\f2\cf11 
\par }{\f2 **********************************************************************************************************
\par select vat_detail.vat, 1,  price.salesqty_factor,  0,  price.price,  price.special_price,  price.discount,  price_list.special_offer,  price_list.discount,  price_list.description,  price_list.matchcode,  price_list.incl_vat, article.article_key,  article.article_no,  vat_detail.vat,  0,  article_desc.matchcode,  article_desc.matchcode,  article_desc.short_text }{\f2\cf5 from vat_detail, vat, article,  vat_country,price_list, price, }{\b\f2\ul\cf5 article_desc}{\f2\cf5  }{\f2 where vat_detail.vat_fkey      = vat.vat_key  AND   vat_detail.country_fkey  = vat_country.country_fkey AND   vat.record_status < 3  AND   vat_country.vat_fkey      = vat.vat_key  AND   vat_country.record_status < 3 and vat_detail.record_status < 3 AND   vat_detail.valid_from    = }{\f2\cf2 (SELECT MAX(v2.valid_from) FROM vat_detail as v2 WHERE v2.vat_fkey      = vat_detail.vat_fkey  AND   v2.country_fkey  = vat_detail.country_fkey  AND   v2.valid_from    <= 960477902 AND   v2.record_status < 3)  }{\f2 AND   price_list.valid_from_changed = }{\f2\cf2 (SELECT MAX(pl2.valid_from_changed) FROM price_list as pl2 WHERE pl2.article_fkey      = price_list.article_fkey AND pl2.custgroup_fkey     = price_list.custgroup_fkey AND pl2.valid_from_changed <= 960477902 AND pl2.record_status      < 3) }{\f2 AND   price_list.record_status      < 3 AND price.article_fkey    = price_list.article_fkey AND price.salesqty_factor = }{\f2\cf2 (SELECT MIN(p2.salesqty_factor) FROM price as p2 WHERE p2.article_fkey   = price.article_fkey AND p2.custgroup_fkey  =  price.custgroup_fkey AND p2.valid_from      =  price.valid_from AND p2.record_status   < 3) }{\f2 AND   article.record_status < 3 AND   vat.vat_key       = article.vat_fkey AND article_desc.article_fkey   = article.article_key 
\par 
\par ***********************************************************************************************************
\par ******************** Select with 3 subselects, }{\b\f2 8 tables}{\f2 ,  without Table_aliasis in the main Select:
\par ******************** resultset }{\b\f2\cf11 correct
\par }{\f2 ******************** Execution_Time : }{\f2\cf14 slowly}{\b\f2\cf14  ( more 30 Sec)}{\b\f2\cf11 
\par }{\f2 **********************************************************************************************************
\par select vat_detail.vat, 1,  price.salesqty_factor,  0,  price.price,  price.special_price,  price.discount,  price_list.special_offer,  price_list.discount,  price_list.description,  price_list.matchcode,  price_list.incl_vat, article.article_key,  article.article_no,  vat_detail.vat,  0,  article_desc.matchcode,  article_desc.matchcode,  article_desc.short_text, art_custgroup.discount_allowed,  art_custgroup.discount,  art_custgroup.min_order_qty,  art_custgroup.max_order_qty }{\f2\cf5 from vat_detail, vat, article,  vat_country,price_list, price, article_desc, }{\b\f2\ul\cf5 art_custgroup}{\f2\cf5  }{\f2 where vat_detail.vat_fkey      = vat.vat_key  AND   vat_detail.country_fkey  = vat_country.country_fkey AND   vat.record_status < 3  AND   vat_country.vat_fkey      = vat.vat_key  AND   vat_country.record_status < 3 and vat_detail.record_status < 3 AND   vat_detail.valid_from    = }{\f2\cf2 (SELECT MAX(v2.valid_from) FROM vat_detail as v2 WHERE v2.vat_fkey      = vat_detail.vat_fkey  AND   v2.country_fkey  = vat_detail.country_fkey  AND   v2.valid_from    <= 960477902 AND   v2.record_status < 3)  }{\f2 AND   price_list.valid_from_changed = }{\f2\cf2 (SELECT MAX(pl2.valid_from_changed) FROM price_list as pl2 WHERE pl2.article_fkey      = price_list.article_fkey AND pl2.custgroup_fkey     = price_list.custgroup_fkey AND pl2.valid_from_changed <= 960477902 AND pl2.record_status      < 3) }{\f2 AND   price_list.record_status      < 3 AND price.article_fkey    = price_list.article_fkey AND price.salesqty_factor = }{\f2\cf2 (SELECT MIN(p2.salesqty_factor) FROM price as p2 WHERE p2.article_fkey   = price.article_fkey AND p2.custgroup_fkey  =  price.custgroup_fkey AND p2.valid_from      =  price.valid_from AND p2.record_status   < 3) }{\f2 AND   article.record_status < 3 AND   vat.vat_key       = article.vat_fkey AND article_desc.article_fkey   = article.article_key AND   art_custgroup.article_fkey   = article.article_key  AND   art_custgroup.active         = 1 AND   art_custgroup.record_status  < 3
\par 
\par ***********************************************************************************************************
\par ******************** Select with 3 subselects, }{\b\f2 9 tables}{\f2 ,  without Table_aliasis in the main Select:
\par ******************** resultset = null  }{\b\f2\cf11 not correct
\par }{\f2 ******************** Execution_Time : }{\f2\cf14 not too fast}{\b\f2\cf14  ( 10 Sec)}{\b\f2\cf11 
\par }{\f2 **********************************************************************************************************
\par select vat_detail.vat, 1,  price.salesqty_factor,  0,  price.price,  price.special_price,  price.discount,  price_list.special_offer,  price_list.discount,  price_list.description,  price_list.matchcode,  price_list.incl_vat, article.article_key,  article.article_no,  vat_detail.vat,  0,  article_desc.matchcode,  article_desc.matchcode,  article_desc.short_text, art_custgroup.discount_allowed,  art_custgroup.discount,  art_custgroup.min_order_qty,  art_custgroup.max_order_qty }{\f2\cf5 from vat_detail, vat, article,  vat_country,price_list, price, article_desc, art_custgroup}{\b\f2\cf5 , basket }{\f2 where vat_detail.vat_fkey      = vat.vat_key  AND   vat_detail.country_fkey  = vat_country.country_fkey AND   vat.record_status < 3  AND   vat_country.vat_fkey      = vat.vat_key  AND   vat_country.record_status < 3 and vat_detail.record_status < 3 AND   vat_detail.valid_from    = }{\f2\cf2 (SELECT MAX(v2.valid_from) FROM vat_detail as v2 WHERE v2.vat_fkey      = vat_detail.vat_fkey  AND   v2.country_fkey  = vat_detail.country_fkey  AND   v2.valid_from    <= 960477902 AND   v2.record_status < 3)  }{\f2 AND   price_list.valid_from_changed = }{\f2\cf2 (SELECT MAX(pl2.valid_from_changed) FROM price_list as pl2 WHERE pl2.article_fkey      = price_list.article_fkey AND pl2.custgroup_fkey     = price_list.custgroup_fkey AND pl2.valid_from_changed <= 960477902 AND pl2.record_status      < 3) }{\f2 AND   price_list.record_status      < 3 AND price.article_fkey    = price_list.article_fkey AND price.salesqty_factor = }{\f2\cf2 (SELECT MIN(p2.salesqty_factor) FROM price as p2 WHERE p2.article_fkey   = price.article_fkey AND p2.custgroup_fkey  =  price.custgroup_fkey AND p2.valid_from      =  price.valid_from AND p2.record_status   < 3) }{\f2 AND   article.record_status < 3 AND   vat.vat_key       = article.vat_fkey AND article_desc.article_fkey   = article.article_key AND   art_custgroup.article_fkey   = article.article_key  AND   art_custgroup.active         = 1 AND   art_custgroup.record_status  < 3 AND   vat_country.country_fkey = basket.country_fkey  AND   art_custgroup.custgroup_fkey = basket.custom_group_fkey  AND article_desc.language_fkey = basket.language_fkey AND basket.basket_key = '96021412336029069'
\par  
\par  
\par ***********************************************************************************************************
\par ******************** Select with 3 subselects, }{\b\f2 9 tables}{\f2 ,  }{\b\f2\ul with Table_aliasis in the main Select}{\f2 :
\par ******************** resultset: sqlexception}{\b\f2\cf11 
\par }{\f2 ******************** Execution_Time : }{\f2\cf14 not too fast}{\b\f2\cf14  ( 10 Sec)}{\b\f2\cf11 
\par }{\f2 **********************************************************************************************************
\par select vd.vat, 1,  p.salesqty_factor,  0,  p.price,  p.special_price,  p.discount,  pl.special_offer,  pl.discount,  pl.description,  pl.matchcode,  pl.incl_vat, article.article_key,  article.article_no,  vd.vat,  0,  article_desc.matchcode,  article_desc.matchcode,  article_desc.short_text, art_custgroup.discount_allowed,  art_custgroup.discount,  art_custgroup.min_order_qty,  art_custgroup.max_order_qty }{\f2\cf5 from vat_detail as vd, vat, article,  vat_country,price_list as pl, price as p, article_desc, art_custgroup}{\b\f2\cf5 , }{\f2\cf5 basket}{\b\f2\cf5  }{\f2 where vd.vat_fkey      = vat.vat_key  AND   vd.country_fkey  = vat_country.country_fkey AND   vat.record_status < 3  AND   vat_country.vat_fkey      = vat.vat_key  AND   vat_country.record_status < 3 and vd.record_status < 3 AND   vd.valid_from    = }{\f2\cf2 (SELECT MAX(vat_detail.valid_from) FROM vat_detail WHERE vat_detail.vat_fkey      = vd.vat_fkey  AND   vat_detail.country_fkey  = vd.country_fkey  AND   vat_detail.valid_from    <= 960477902 AND   vat_detail.record_status < 3)  }{\f2 AND   pl.valid_from_changed = }{\f2\cf2 (SELECT MAX(price_list.valid_from_changed) FROM price_list  WHERE price_list.article_fkey      = pl.article_fkey AND price_list.custgroup_fkey     = pl.custgroup_fkey AND price_list.valid_from_changed <= 960477902 AND price_list.record_status      < 3) }{\f2 AND   pl.record_status      < 3 AND p.article_fkey    = pl.article_fkey AND p.salesqty_factor = }{\f2\cf2 (SELECT MIN(price.salesqty_factor) FROM price  WHERE price.article_fkey   = p.article_fkey AND price.custgroup_fkey  =  p.custgroup_fkey AND price.valid_from      =  p.valid_from AND price.record_status   < 3) }{\f2 AND   article.record_status < 3 AND   vat.vat_key       = article.vat_fkey AND article_desc.article_fkey   = article.article_key AND   art_custgroup.article_fkey   = article.article_key  AND   art_custgroup.active         = 1 AND   art_custgroup.record_status  < 3 AND   vat_country.country_fkey = basket.country_fkey  AND   art_custgroup.custgroup_fkey = basket.custom_group_fkey  AND article_desc.language_fkey = basket.language_fkey AND basket.basket_key = '96021412336029069' 
\par 
\par }}