Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7189449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:18:17+00:00 2026-05-28T19:18:17+00:00

I am working at the moment with the advantage database server from sybase. I

  • 0

I am working at the moment with the advantage database server from sybase. I am programming in delphi and I am using a local server. My problem is, if I make a sql query inside my own source code the query is 3 times slower (especially for nested Select queries) as if I would use exactly the same query inside the Advantage Database Architect delivered by sybase, too.
The database is also the same. Is there any optimization step I am missing?

My Source Code looks like this:

  //Initializing Connection and Query
  FADSConnection.LoginPrompt := false;
  FADSConnection.ConnectPath := Filename;
  FADSConnection.AdsServerTypes := [stADS_LOCAL];
  FADSConnection.Name := 'ADB';
  FADSConnection.EncryptionOptions.DataEncryptionType := etAdsAES256;
  FADSConnection.IsConnected := true;


  FADSQuery.DatabaseName := FADSConnection.Name;
  FADSQuery.SourceTableType := ttAdsADT;
  FADSQuery.AdsTableOptions.AdsCharType := GERMAN_VFP_CI_AS_437;

  s := 'SELECT *' 
       + 'FROM ADB_Table1 WHERE No IN' 
       +'(SELECT No' 
       +       'FROM ADB_Table2 WHERE V=0.4 AND N=26 AND No IN' 
       +       '(SELECT No FROM ADB_Table2 WHERE V=0.6 AND N=8)) AND Count=2'

  FADSQuery.sql.Text := s;
  FADSQuery.Open;
  FADSQuery.first;

The Query takes 600 ms in my program. In the advantage database architect it needs 200 ms. The database has around 18000 entries.

Thank you in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:18:18+00:00Added an answer on May 28, 2026 at 7:18 pm

    So, I found my mistake:

    The Problem is the initialization of the query instance.
    Somehow overhanding of the Source Table Type and the AdsCharType isn’t necessary.

    FADSQuery.SourceTableType := ttAdsAdt;
    FADSQuery.Tableoptions.AdsCharType := GERMAN_VFP_CI_AS_437;
    

    I just removed the above lines and my queries are nearly as fast as the Advantage Data Architect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing a lab at the moment working on fitness functions. The problem is
In my console application I have a local variable that's working fine the moment
I am at the moment working on a project on Visual Studio 2010 using
Working on a project at the moment and we have to implement soft deletion
Working on a bunch of forms at the moment and I'm finding that I
At the moment I am working on a project admin application in C# 3.5
For the moment we're still working with the 2.0 framework and and although 2.0
A project I'm working on at the moment involves refactoring a C# Com Object
I am working with legacy systems at the moment, and a lot of work
I am working on a project at the moment that requires a dialog box

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.