Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Data Dictionary

edited June 2006 in General
I'm tryong to use Data dictionary

(in an attempt to stop the report system doing Select * from Table where
'c'<>'c' causing Table scans taking 3 minutes ':(

But i am stuck on the supplied IBX demo .. When double clicking teh data
dictionary component i get ..

"Session class could not be found for SessionType:IBXSession"

Any ideas ?

Comments

  • edited June 2006
    Sorted Never mind .. Had to create my own pakcage with the RBIBX in .. Not
    sure why it didnt include as default .. couldnt see the relevant BPL ..


  • edited June 2006
    Hmm But its still VERRRRY slow

    How can i get the report system to read the structure from the Data
    Dictionary instead of running select * from table where 'c'<>'c'


  • edited June 2006

    - the SQL statement, select * from table where 'c'<>'c', is designed to be
    instantaneous because the Where clause contains a constant expression that
    evaluates to false - thus an empty result set.

    - perhaps you are using Firebird? A customer recently complained that
    statement was slow and said that he modified his DADE plug-in to use the
    following code instead.

    FQuery.SQL.Text := 'SELECT FIRST 0 * FROM ' + aDataName;

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited July 2006
    No im using Interbase 7.5 .. But yes it takes 60 seconds + on the current
    database 3.5 Gb
    But thankyou for the tip

  • edited July 2006
    Adrian Billingham wrote:


    the IB equivalent would be

    select * from table rows 0

    judging from a quick test in IBConsole this seems to have the
    desired effect.


    --
    ilkka hyvärinen
  • edited July 2006

    Thanks for the tip :)

    I will add these two optional statements to the daIBExpress.pas unit for the
    method TdaIBXDataSet.SetDataName.

    {optional optimization for Interbase}
    // FQuery.SQL.Text := 'SELECT * FROM ' + aDataName + ' ROWS 0';

    {optional optimization for Firebird}
    // FQuery.SQL.Text := 'SELECT FIRST 0 * FROM ' + aDataName;




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.