Query builder and multiple linked tables...

Hi all,
I have a database with a large table (50+ fields) and lots of tables (at
least 10 tables) linked to the bigger one.
I can link 7 or 8 tables using Query builder but after that, it gets slow
and slower.
I can't link other tables since it appear to hang.
How can I solve this?
Here is a sample of the large table (articles):
- id_art
- code_art
- material_id_art (fk)
- color_id_art (fk)
- finishing_id_art /fk)
- and so on... with other fields set as foreign keys.
The color table is:
- id_col
- colid_col
- name_col
- language_col
The table view is:
id_col colid_col name_col language_col
1 1 rosso it
2 1 red uk
3 1 rojo es
The other tables follow the same color table specification.
I would like to obtain all articles with color_id_art field equal to the
color.colid_col field AND color.language_col equal to a session variable
(language). This session variable contains 'it', 'uk', or 'es', depending
on user selection on other pages.
I can use query builder to do something similar with few tables but when
the linked tables are 10 or more the query builder began to slow down too
much and is totally unusable.
Is there a way to create such a query manually?
I'm not a SQl programmer so, I have not all the knowledge to do this.
Can anyone point me in the right direction or point me to some tutorial
about such a problem?
I thank you in advance.
tony

Ciao Tony,
Well, the main table is 4000+ records
I´ve heard of other users having similar issues with this (or more) amount of data, what´s not surprising, because every time you´re making a change to your query, the Query Builder tries to refresh the browser
I think that the problem is related to too much inner joins and too many WHERE clauses with AND condition
maybe this might add to the problem, but I´m pretty convinced that the major bottleneck is the substantial amount of records your main table has.
Günter, can I ask you how would you manage a multilingual product catalog where the main table (products) has lots of linked details tables (color, finishing, structure...) to be translated on a number of languages?
this is indeed a little tricky by nature, however I think that storing e.g. all the international color names in a table is too complicated, when you could simply...
a) check the currently running language session variable
b) define a PHP if/else condition which will "virtually" translate the stored "id_col" values, example:
if ($_session['language'] == "uk") {
$pattern = array("1", "2", "3", "4");
$replace = array("red", "blue", "black"', "green");
$colors = str_replace($pattern, $replace, $row_queryname['columnname']);
else {
$pattern = array("1", "2", "3", "4");
$replace = array("rosso", "blu", "nero"', "verde");
$colors = str_replace($pattern, $replace, $row_queryname['columnname']);
3. later in your page "echo" the alias variable $colors, which should return different results depending on the currently active language session variable
Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver

Similar Messages

  • JOINING local table and DB Link table performance

    Hellou everybody,
    can somebody tell me how it is work in Oracle DB when you want to join some local table and DB Link table for example:
    Select a.col1, b.col2
    from local_table a , remote_table@dblink b
    where a.key = b.key;
    and when I use DRIVING_SITE hint and the all data from remote table is transforming (pushing) into my DB (in some temporar space), it will transform although Indexes from remote table?
    So when I use some JOINS, this joins will be fast enought? Will they using remote table indexes to query the data or not?
    Thank you for response.
    Zoffob

    user10708026 wrote:
    Is it as simple as:No. Use:
    UPDATE  habitationalsupplement live_hab
       SET  primaryheatingapparatuscode = (
                                           SELECT  hab_backup.primaryheatingapparatuscode
                                             FROM  habitationalsupplement@backupdb hab_backup
                                             WHERE hab_backup.itemobjectid = live_hab.itemobjectid
                                               AND hab_backup.itemversionnumber = live_hab.itemversionnumber
      WHERE (itemobjectid,itemversionnumber) IN (
                                                 SELECT  hab_backup.itemobjectid,
                                                         hab_backup.itemversionnumber
                                                   FROM  habitationalsupplement@backupdb hab_backup
    /SY.

  • Query Builder and 8i

    Is it possible to use Query Builder with 8i?
    I installed it but was unable to connect to the starter database installed with 8i.
    I installed the Query Builder(and Project Builder) into a different directory from the 8i install.
    When QB starts, it asks for the name, PW, and connection. I enter the N and PW and the instance of the 8i DB but it comes back with a transport error.
    1. Is Q Builder compatible with 8i?
    2. Is there a document describing how to set them up to work together?
    Thank you very much,
    David Littman
    [email protected]

    use runproduct command in developer 2000

  • Query Builder and Expanded Form in Search

    I've changed the labels of some metadata fields like content type. In the expanded form it shows OK, but in the query builder drop down it's still content type. How can I change it?
    tnx in advance

    Hi, where did you make the change of label?
    I use rules, so the way I do it (and it shows for both query builder and extended search) is by putting the value in the "use custom label" when I edit my rule.
    cheers

  • Query Builder doesnt load the tables. Schema not loaded

    Hi all,
    One small issue i am facing.. I have made a connection to Oracle db using the user id given by my DBA.
    But when I try to open the query builder it doesnt load any tables.. cant see any tables.
    Findings:
    If on toad i run a query
    select * from table it returns me noting.
    But if i run it with SIEBEL
    Select * from SIEBEL.table it returns result.
    just prefixing it with SIEBEL gives me the result.
    Do i need to ask the DBA to give my user id the access to run queries without prefixing SIEBEL... what exactly shld i ask him to do
    OR is something we can do at the publisher end itself so that it strt loading required tables avalable for my user id?
    thanks a lot!!
    Dev

    From your description I'd conclude that your DBA has provided you database access via a user ID (schema), let's say USER1. If you have registered this database as JDBC / JNDI data source using this particular user, then you will always need to prefix your table names with 'SIEBEL.' as the database objects are stored in the SIEBEL schema, and not in the USER1 schema.
    You may question your DBA about the feasibility of setting up a logon trigger on the USER1 account so that it automatically switches the current schema to the SIEBEL one.
    alter session set current_schema = <your_schema_name>;
    Something similar was discussed in the following thread:
    how to switch schema in a logon trigger when in 3-tier (how to define case)

  • EA2 Query Builder not showing related tables

    While using Query Builder with the sample schema(s) I click on the Options->Show Related Tables and never get a response back. I am on a Windows XP machine. After waiting several minutes I just cancel out of Query Builder.
    Thanks,
    Raoul

    Hi Hema,
    First of all you have to make sure that you had given the correct data source in JDBC Connecction.
    When the work is in progressand we click on Backspace button then we will get the page as greyed.Make sure that you have to wait for a while after saving the report and never use the Backspace button.
    Thanks,
    Praveen.

  • Enhancement Request - Query Builder and Synonyms

    My APEX instance is not the same one as some of the data we need to access. Is it possible to allow the query builder to see Synonyms as well as tables and views?

    I'd echo that, though it'd be even better if it only showed synonyms for tables and views...but then you have to answer the question of how far down the rabbit hole you want to go (what about synonyms of synonyms of tables, etc.?)
    For now, at least, you can always create a view, rather than a synonym.
    -David

  • ALV for one header and multiple item table

    Hello All,
    I have a requirement to display records from one header and three item table using ALV.
    The output should be such that
         1-line - record from header table
         followed by - records from the 1st item table(can have multiple entries corresponding to a header record and each should be displayed on separate line)
         followed by - records from 2nd item table(can have multiple entries corresponding to a header record and each should be displayed on separate line)
         followed by - record from 3rd item table(can have multiple entries corresponding to a header record and each should be displayed on separate line)
    Can you help me out.
    Thanks and regards,
    Subramanian.

    hi
    data population is same for alv or normal reporting.
    First you select the data from header
              select from item data using for all entries in it_header where....
              select item 2
              selct item 3
    loop a it_header
    read item1
    read item2
    read item3
    check sy-subrc
    move to i_final
    then build fieldcatalog and display..
    look the example
    SELECT   PERNR
               STELL
               WERKS
               ABKRS
               ENAME
               ENDDA
               BEGDA
               ORGEH
               PERSG
               PERSK
               KOSTL
          FROM PA0001
          INTO TABLE I_PA0001
         WHERE PERNR IN S_PERNR
           AND ABKRS IN S_ABKRS
           AND PERSG IN S_PERSG.
    SELECT  SPRSL
                STELL
                ENDDA
                STLTX
                FROM T513S
                INTO TABLE I_T513S
                FOR ALL ENTRIES IN I_PA0001
                WHERE STELL = I_PA0001-STELL AND SPRSL = 'EN'.
        SELECT  PERSA
                NAME1
             FROM T500P
             INTO TABLE I_T500P
             FOR ALL ENTRIES IN I_PA0001
            WHERE PERSA EQ I_PA0001-WERKS.
      LOOP AT I_PA0001 .
    READ TABLE I_T513S INTO WA_T513S WITH KEY STELL = WA_PA0001-STELL
                                                  SPRSL = 'EN'
                                                  ENDDA = WA_PA0001-ENDDA.
        IF SY-SUBRC IS INITIAL.
          MOVE WA_T513S-STLTX TO WA_FINAL-STLTX.
        ENDIF.
        V_SNO = V_SNO + 1.
    Read Value For Personal area Text.
        READ TABLE I_T500P INTO WA_T500P WITH KEY
                                PERSA = WA_PA0001-WERKS.
        IF SY-SUBRC EQ 0.
          MOVE WA_T500P-NAME1 TO WA_FINAL-NAME1.
        ENDIF.
    FORM DISPLAY_DATA .
    --BUILDING FIELD CATALOG--
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         I_PROGRAM_NAME               = V_REPID
         I_INTERNAL_TABNAME           = 'I_FINAL'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
         I_INCLNAME                   = V_REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
        CHANGING
          CT_FIELDCAT                  = I_FCAT[]
       EXCEPTIONS
         INCONSISTENT_INTERFACE       = 1
         PROGRAM_ERROR                = 2
         OTHERS                       = 3
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *--Modifying titles of Field Catalog--
      READ TABLE I_FCAT INTO WA_FCAT WITH KEY FIELDNAME = 'S_NO'.
      IF SY-SUBRC EQ 0.
        WA_FCAT-REPTEXT_DDIC = 'X'.
        WA_FCAT-SELTEXT_S = TEXT-041.
        WA_FCAT-SELTEXT_M = TEXT-041.
        WA_FCAT-SELTEXT_L = TEXT-041.
        WA_FCAT-OUTPUTLEN = 3.
        WA_FCAT-JUST = 'L'.
        MODIFY  I_FCAT FROM WA_FCAT INDEX SY-TABIX.
        CLEAR WA_FCAT.
      ENDIF.
    do for all the fields u want to display..
    Award points if useful.

  • QueryString issues with Query Builder and Search Box

    Hi Guys,
    I've got the following scenario (Issues are bolded for quicker reading):
    I have a search results pages named results.aspx
    I have a page, named messages.aspx, with a webpart that display messages from a specific folder (which can be changed in the webpart properties). On that page, there's a search box which will lead to results.aspx, and will do search only on the specific
    folder.
    On the other hand, when I'm using Content Search Web Part, I can use the query builder to do the following:
    ParentLink:{QueryString.folder}
    So all I have left to do is to send the folder as a query string parameter from messages.aspx to results.aspx.
    (1) The search box doesn't support sending other QueryString parameters,
    which is also known to happen in previous SP versions, so I fixed the onclick events and voila, the folder parameter is transferred to results.aspx.
    But something weird happens in results.aspx:
    When I'm first redirected from messagses.aspx to results.aspx I get the follwing URL:
    /Pages/results.aspx?k=Washington&folder=Home - I've got results
    When another query is issued from the search box of results.aspx I'm getting the folliwing URL:
    /Pages/results.aspx?k=Washington&folder=Home#k=Indiana - I've got NO results.
    Same with paging:
    /Pages/results.aspx?k=Washington&folder=Home#s=11
    (2) When a QueryString parameter is present in the results.aspx page, and than another query (different keywords, paging or anything) is issued using AJAX and hashtags  - no results are returned.
    My guess is a client side issue: When the a new query is issued, adding a hashtag (#) to the URL, it ignores the QueryString parameter currently present in the URL, and thus the server doesn't recieve it in the query packet/http post xml, which creates a
    valid query with no results, in my case: ParentLink:"", which I manually checked and does yield no results.
    I've also tried the following with no help:
    /Pages/results.aspx#k=Washington#folder=Home - no results. my guess is that folder is now not a QueryString
    /Pages/results.aspx?folder=Home#k=Washington - No results.
    /Pages/results.aspx#k=Washington&folder=Home - The query text issued was "Washington&folder=Home" - no results of course.
    Any ideas any one?
    Amir

    Hi Amir,
    after some months I found a workaround that solves this issue: just add & after your query string value, it will separate your parameter value from other strings that may be added by sharepoint controls.
    ie:
    if your page is http://spsite/page.aspx?param=value
    just call it like this http://spsite/page.aspx?param=value&
    It works!
    Ciao
    Fabio

  • FBCJC1 and FBN1 linking table and field

    Dear
    I am trying to link fields BELNR from BKPF table and field D_POSTING_NUMB from TCJ_POSITIONS table to get a report for displaying Addl. Text1 column in FBL3N report. 
    BELNR is FI document number field and
    D_POSTING_NUMB is internal document number field generated by the system while doing FBCJ.
    In which table the link between FBCJC1 and FBN1 is stored?   What is the linking table for these two fields.  Early reply is highly solicited.
    Regards

    Hi Arvind,
    I think, there is no one-to-one link between FBCJC1 and FBN1.
    Every posting in Cash Journal will post the CJ document with the next available number in FBCJC1 and similarly the corresponding FI posting will post the FI document with the next available number in the interval in FBN1 assigned to the relevant document type.
    Regards,
    Shilpi

  • Clarifications about Query Builder and Additional Default Layout in Reports 6i

    1) Is Query Builder re-entrant in Reports 6i? If yes, what is the method. As when I tried to re-eter, it gave me message '..... Syntax Error'.
    2) IN 'ADDITIONAL Default Layout', Reports 6i does not allow group field to be
    included in 'the fields to be printed' list. It allows but in next tab it omits that group field.
    As a result no repeating frame for the Group is generated in the 'ADDITIONAL Default Layout'.
    What is wrong?
    Pl. guide.
    Tariq

    2) IN 'ADDITIONAL Default Layout', Reports 6i does not allow group
    field to be included in 'the fields to be printed' list. It allows
    but in next tab it omits that group field.
    As a result no repeating frame for the Group is generated in >the 'ADDITIONAL Default Layout'. Not sure I fully understand the question but you seem to be saying that if you select a field in the ADL tool, it doesn't show up in the layout. This can only happen if you select a field in the "Fields" tab from a group you haven't selected in the "Groups" tab.
    Ideally Reports shouldn't show these fields since you haven't selected the groups. Unfortunately it does and you need to ensure all the appropriate groups have been selected in the "Groups" tab.
    At least it will tell you if you have selected a group but haven't selected any fields for the group or if you haven't selected enough groups for the type of layout you're trying to create.

  • Query Builder and SQL-Developer

    Hello everyone,
    My proposal is to customize SQL-Developer (via Tools > Preferences ...) so that the end user can use it without danger for the data.
    Example: the end user can only create reports, without possibility of drop, update, delete, etc.
    The paragraph “Query Builder” of the article “ [Building Queries Visually|http://www.oracle.com/technology/oramag/oracle/08-mar/o28sql.html] ” (Oramag march/april 2008, page 59) inspired this question.
    Please, vote for this proposal!
    Thank you
    Jean-Louis

    I overlayed the pre-release versionsDo you mean you installed in the same directory?
    Don't do that.
    There's a system directory (sqldeveloper\sqldeveloper\system) which holds settings and everything, which very well might be corrupted to be used for a newer release.
    Try deleting it, it will be regenerated at next startup. Or even better: re-install in another directory all together...
    K.

  • Query map the DB Link Table

    Hi Team
    I have query like
    select site_id from site;
    O/P :-
    12323
    12444
    12333
    but i want to stored this date on variable like
    v_site (12323,12444,12333)
    because i about using dblink for other be i need to put this values like
    select * from table@dblink
    where site_id in ( v_site);
    Thanks for Advance...

    Hi,
    why dont you put like
    ----Not tested-----
    site_id in (select site_id from site)Regards,
    CKLP
    Pls mark posts and answered/helpful it you consider it really was.
    Edited by: CKLP on Sep 26, 2011 5:12 AM

  • Multiple flat file in and multiple target tables

    Hi,
    How can we have multiple flat file into multiple targets.
    I am trying to load data from multiple flat files into respective tables. But it gives error like
    VLD-2411: Cannot handle two file structures
    Make sure that only one file structure is used in a SQL*Loader map
    Can anyone help.
    Regards
    Rakesh Kumar

    I donot thing in one mapping you can take multiple sqlloader file.
    If want to load data form multiple file use External table.

  • Forming generic sql query   for joining multiple sap tables in ABAp

    Hi,
    I am new to this abap field ,facing an issue onsap-jco project . I have used RFC_READ_TABLE  FM ,Customized this FM but facing an issue how to write generic  open SQl select statement  for joining multiple tables  using RFC_READ_TABLE .Kindly help on this issue.
    Thanks.

    something like this? If your tuples are not single columns, then you'll have to use dynamic sql to achieve the same result.with
    table_1 as
    (select '|Xyz|Abc|Def|' tuple from dual
    table_2 as
    (select '|Data1|Data21|Data31|Data41|Data51|' tuple from dual union all
    select '|Data2|Data22|Data32|Data42|Data52|' tuple from dual union all
    select '|Data3|Data23|Data33|Data43|Data53|' tuple from dual union all
    select '|Data4|Data24|Data34|Data44|Data54|' tuple from dual union all
    select '|Data5|Data25|Data35|Data45|Data55|' tuple from dual
    select case the_row when 1
                        then tuple
                        else '|---|---|' || substr(tuple,instr(tuple,'|',1,3) + 1)
           end tuple
      from (select substr(a.tuple,instr(a.tuple,'|',:one_one),instr(a.tuple,'|',:one_one + 1)) ||
                   substr(a.tuple,instr(a.tuple,'|',1,:one_two) + 1,instr(a.tuple,'|',1,:one_two + 1) - instr(a.tuple,'|',1,:one_two)) ||
                   substr(b.tuple,instr(b.tuple,'|',1,:two_one) + 1,instr(b.tuple,'|',1,:two_one + 1) - instr(b.tuple,'|',1,:two_one)) ||
                   substr(b.tuple,instr(b.tuple,'|',1,:two_two) + 1,instr(b.tuple,'|',1,:two_two + 1) - instr(b.tuple,'|',1,:two_two)) tuple,
                   rownum the_row
              from table_1 a,table_2 b
    order by the_rowRegards
    Etbin
    Message was edited by:Etbin
    user596003

Maybe you are looking for