Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

indexed query ptoblem

7 posts in FoxPro Last posting was on 2003-09-26 08:54:35.0Z
Max Posted on 2003-09-20 07:12:07.0Z
From: "Max" <maxi4@mail.ru>
Newsgroups: advantage.foxpro
Subject: indexed query ptoblem
Date: Sat, 20 Sep 2003 14:12:07 +0700
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 81.1.200.134
Message-ID: <3f6bfeef@solutions.advantagedatabase.com>
X-Trace: 20 Sep 2003 01:17:03 -0700, 81.1.200.134
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!81.1.200.134
Xref: solutions.advantagedatabase.com Advantage.FoxPro:145
Article PK: 1109499

hi all!
i use ADS Server 6.2 ,Delphi7 and ADS Descendant Components.
i start with simple ads application from help file getstart.pdf
when i use TADSTable to open my dbf table, all indexes are uses automaticly
and its fast
when i use TADSQuery to open my single dbf table, all indexes are uses
automaticly and its fast
when i use TADSQuery to open several my dbf tables, no indexes are uses,and
its very slow
how can i directly point to exist indexes in TADSQuery?

Thanks all
Max Rodkin ICQ#: 99907119 Current ICQ status: +
mail maxi4@mail.ru


Alex Wong (ADS) Posted on 2003-09-23 22:31:09.0Z
From: "Alex Wong \(ADS\)" <alexw@extendsys.com>
Newsgroups: advantage.foxpro
References: <3f6bfeef@solutions.advantagedatabase.com>
Subject: Re: indexed query ptoblem
Date: Tue, 23 Sep 2003 16:31:09 -0600
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 198.60.232.41
Message-ID: <3f70c7bb@solutions.advantagedatabase.com>
X-Trace: 23 Sep 2003 16:22:51 -0700, 198.60.232.41
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.60.232.41
Xref: solutions.advantagedatabase.com Advantage.FoxPro:147
Article PK: 1109502

Hi Max,

I don't understand what do you mean by open several dbf tables. Can you post
the SQL statement you used in the TAdsQuery that is slow?

--
Alex Wong
Advantage R&D

"Max" <maxi4@mail.ru> wrote in message
news:3f6bfeef@solutions.advantagedatabase.com...
> hi all!
> i use ADS Server 6.2 ,Delphi7 and ADS Descendant Components.
> i start with simple ads application from help file getstart.pdf
> when i use TADSTable to open my dbf table, all indexes are uses
automaticly
> and its fast
> when i use TADSQuery to open my single dbf table, all indexes are uses
> automaticly and its fast
> when i use TADSQuery to open several my dbf tables, no indexes are
uses,and
> its very slow
> how can i directly point to exist indexes in TADSQuery?
>
> Thanks all
> Max Rodkin ICQ#: 99907119 Current ICQ status: +
> mail maxi4@mail.ru
>
>
>


Max Posted on 2003-09-24 08:46:28.0Z
From: "Max" <maxi4@mail.ru>
Newsgroups: advantage.foxpro
References: <3f6bfeef@solutions.advantagedatabase.com> <3f70c7bb@solutions.advantagedatabase.com>
Subject: Re: indexed query ptoblem
Date: Wed, 24 Sep 2003 15:46:28 +0700
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 81.1.200.134
Message-ID: <3f715afa@solutions.advantagedatabase.com>
X-Trace: 24 Sep 2003 02:51:06 -0700, 81.1.200.134
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!81.1.200.134
Xref: solutions.advantagedatabase.com Advantage.FoxPro:149
Article PK: 1109504


"Alex Wong (ADS)" <alexw@extendsys.com> wrote in message:
news:3f70c7bb@solutions.advantagedatabase.com...
> Hi Max,
>
> I don't understand what do you mean by open several dbf tables. Can you
post
> the SQL statement you used in the TAdsQuery that is slow?

Hi Alex,
i mean,for example, exist 2 tables:
orders(
id numeric
consumer numeric
date date
)
consumers(
id numeric
name string
)

desired sql query:
'select o.date, c.name from orders o left join consumers c on
c.id=o.consumer'

no index is automaticly used with thise quety execution throw TADSQuery
component
----
Max Rodkin


Joachim Duerr (ADS Support) Posted on 2003-09-24 09:59:26.0Z
From: "Joachim Duerr (ADS Support)" <jojo.duerr@gmx.de>
Subject: Re: indexed query ptoblem
Newsgroups: Advantage.FoxPro
References: <3f6bfeef@solutions.advantagedatabase.com> <3f70c7bb@solutions.advantagedatabase.com> <3f715afa@solutions.advantagedatabase.com>
Organization: Extended Systems GmbH
User-Agent: XanaNews/1.15.7.2
X-Face: ,QMv7[luB)BpWAQ~:"kw6n%0ieY63.:g2K3n~8ky0;||5Xle*Xq+=~<Fy:0CVC2nx@8~vZ
NNTP-Posting-Host: 217.194.75.126
Message-ID: <3f715cee@solutions.advantagedatabase.com>
Date: 24 Sep 2003 02:59:26 -0700
X-Trace: 24 Sep 2003 02:59:26 -0700, 217.194.75.126
Lines: 29
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!217.194.75.126
Xref: solutions.advantagedatabase.com Advantage.FoxPro:150
Article PK: 1109505


Max wrote in <3f715afa@solutions.advantagedatabase.com> :

> i mean,for example, exist 2 tables:
> orders(
> id numeric
> consumer numeric
> date date
> )
> consumers(
> id numeric
> name string
> )
>
> desired sql query:
> 'select o.date, c.name from orders o left join consumers c on
> c.id=o.consumer'
>
> no index is automaticly used with thise quety execution throw
> TADSQuery component

Do you have CDX or NTX indexes? I guess you have CDX - do they have the
same base file name and are located in the same folder?

--
Joachim Duerr
Lead ADS Support, Extended Systems GmbH
Germany
advantage[AT]extendsys.de
- posted with Xananews 1.15.7.2 -


Max Posted on 2003-09-25 03:57:50.0Z
From: "Max" <maxi4@mail.ru>
Newsgroups: Advantage.FoxPro
References: <3f6bfeef@solutions.advantagedatabase.com> <3f70c7bb@solutions.advantagedatabase.com> <3f715afa@solutions.advantagedatabase.com> <3f715cee@solutions.advantagedatabase.com>
Subject: Re: indexed query ptoblem
Date: Thu, 25 Sep 2003 10:57:50 +0700
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 81.1.200.134
Message-ID: <3f7268f0@solutions.advantagedatabase.com>
X-Trace: 24 Sep 2003 22:02:56 -0700, 81.1.200.134
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!81.1.200.134
Xref: solutions.advantagedatabase.com Advantage.FoxPro:151
Article PK: 1109506

Hi Joachim !

"Joachim Duerr (ADS Support)" <jojo.duerr@gmx.de> wrote in :
news:3f715cee@solutions.advantagedatabase.com...
> Max wrote in <3f715afa@solutions.advantagedatabase.com> :
> Do you have CDX or NTX indexes? I guess you have CDX - do they have the
> same base file name and are located in the same folder?

yes. i have CDX indexes in the same folder. They are:
consumers.cdx
index 1 expression=id
orders.cdx
index 1 expression=id
index 2 expression=consumer

Max Rodkin


Alex Wong (ADS) Posted on 2003-09-25 19:19:32.0Z
From: "Alex Wong \(ADS\)" <alexw@extendsys.com>
Newsgroups: Advantage.FoxPro
References: <3f6bfeef@solutions.advantagedatabase.com> <3f70c7bb@solutions.advantagedatabase.com> <3f715afa@solutions.advantagedatabase.com> <3f715cee@solutions.advantagedatabase.com> <3f7268f0@solutions.advantagedatabase.com>
Subject: Re: indexed query ptoblem
Date: Thu, 25 Sep 2003 13:19:32 -0600
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 198.60.232.41
Message-ID: <3f733dee@solutions.advantagedatabase.com>
X-Trace: 25 Sep 2003 13:11:42 -0700, 198.60.232.41
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.60.232.41
Xref: solutions.advantagedatabase.com Advantage.FoxPro:152
Article PK: 1109507

Max,

The indexes should be used automatically. What behavior did you observe that
makes you suspecting the indexes are not being used?

Alex Wong
Advantage R&D

"Max" <maxi4@mail.ru> wrote in message
news:3f7268f0@solutions.advantagedatabase.com...
> Hi Joachim !
> "Joachim Duerr (ADS Support)" <jojo.duerr@gmx.de> wrote in :
> news:3f715cee@solutions.advantagedatabase.com...
> > Max wrote in <3f715afa@solutions.advantagedatabase.com> :
> > Do you have CDX or NTX indexes? I guess you have CDX - do they have the
> > same base file name and are located in the same folder?
> yes. i have CDX indexes in the same folder. They are:
> consumers.cdx
> index 1 expression=id
> orders.cdx
> index 1 expression=id
> index 2 expression=consumer
>
> Max Rodkin
>
>
>


Max Posted on 2003-09-26 08:54:35.0Z
From: "Max" <maxi4@mail.ru>
Newsgroups: Advantage.FoxPro
References: <3f6bfeef@solutions.advantagedatabase.com> <3f70c7bb@solutions.advantagedatabase.com> <3f715afa@solutions.advantagedatabase.com> <3f715cee@solutions.advantagedatabase.com> <3f7268f0@solutions.advantagedatabase.com> <3f733dee@solutions.advantagedatabase.com>
Subject: Re: indexed query ptoblem
Date: Fri, 26 Sep 2003 15:54:35 +0700
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 81.1.200.134
Message-ID: <3f73fff1@solutions.advantagedatabase.com>
X-Trace: 26 Sep 2003 02:59:29 -0700, 81.1.200.134
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!81.1.200.134
Xref: solutions.advantagedatabase.com Advantage.FoxPro:153
Article PK: 1109508

Hi Alex!

"Alex Wong (ADS)" <alexw@extendsys.com> wrote in message
news:3f733dee@solutions.advantagedatabase.com...
> Max,
> The indexes should be used automatically. What behavior did you observe
that
> makes you suspecting the indexes are not being used?
> Alex Wong
> Advantage R&D

Yes, you are right!
I set up AD Architect, and did see, all needed indexes are used.
The problem was in query, it was consist of several union paths. The next
path not execute until previsious path not executed.
It done illusion of slow execution.
Thank Alex,Joachim for your cooperation 8)
Max Rodkin