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.

Query with ADT table is Slow !!

2 posts in FoxPro Last posting was on 2008-10-06 14:14:57.0Z
Hugo Glez. Macias Posted on 2008-10-06 05:21:13.0Z
From: "Hugo Glez. Macias" <gomh7172@hotmail.com>
Newsgroups: Advantage.FoxPro
Subject: Query with ADT table is Slow !!
Date: Mon, 6 Oct 2008 00:21:13 -0500
Lines: 24
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
NNTP-Posting-Host: 189.165.37.155
Message-ID: <48e99ed3@solutions.advantagedatabase.com>
X-Trace: 5 Oct 2008 23:14:59 -0700, 189.165.37.155
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!189.165.37.155
Xref: solutions.advantagedatabase.com Advantage.FoxPro:270
Article PK: 1109624

Hi,

Now we are working with tables DBF's, but we have some problems with the
indexes CDX, then we want to use tables ADT, but I execute a query in the
ARC with ADT tables and is very slow, and I execute the same query but with
tables DBF's and is faster, I execute both query's from ARC.

Somebody Can tell me what I need to do, for that my transactios with ADT
tables are faster, I'm using ADS 6.2

This is my query:

select pa.p_id, mu.status, mu.no_result, pa.contrasena, pa.expediente,
mu.registro, mu.tipo_estud, pa.sucursal as p_sucursal, ' ' as expresion,
pa.p_nombre, pa.p_credenci, pa.urgencia, pa.p_sndx, pa.p_descuent
from paciente pa
inner join muestras mu on pa.p_id=mu.id
where mu.id >= '20061016'and mu.id <= '20070216'

Thank's

Hugo
Cibernetica de México


Edgar Sherman Posted on 2008-10-06 14:14:57.0Z
Date: Mon, 06 Oct 2008 08:14:57 -0600
From: Edgar Sherman <no@email.com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
Newsgroups: Advantage.FoxPro
Subject: Re: Query with ADT table is Slow !!
References: <48e99ed3@solutions.advantagedatabase.com>
In-Reply-To: <48e99ed3@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 10.24.34.164
Message-ID: <48ea1bd2@solutions.advantagedatabase.com>
X-Trace: 6 Oct 2008 08:08:18 -0700, 10.24.34.164
Lines: 36
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.34.164
Xref: solutions.advantagedatabase.com Advantage.FoxPro:273
Article PK: 1109628

Check your indexes and that you have all the new indexes in the ADI.
Also, the concatenation operator for DBF and ADT are different. If
using multiple fields make sure the index for ADT uses the concatenation
of ";" and not "+". Also, make that you are not using the functions
such as DTOS etc, when concatenating fields. ADI uses datatypeless
joins so no need to convert keys.

Finally, you may try out the latest ARC and use the "Show Plan" feature
and see if you can spot any issues with the query.

Edgar

Hugo Glez. Macias wrote:
> Hi,
>
> Now we are working with tables DBF's, but we have some problems with
> the indexes CDX, then we want to use tables ADT, but I execute a query
> in the ARC with ADT tables and is very slow, and I execute the same
> query but with tables DBF's and is faster, I execute both query's from ARC.
>
> Somebody Can tell me what I need to do, for that my transactios with ADT
> tables are faster, I'm using ADS 6.2
>
> This is my query:
>
> select pa.p_id, mu.status, mu.no_result, pa.contrasena, pa.expediente,
> mu.registro, mu.tipo_estud, pa.sucursal as p_sucursal, ' ' as expresion,
> pa.p_nombre, pa.p_credenci, pa.urgencia, pa.p_sndx, pa.p_descuent
> from paciente pa
> inner join muestras mu on pa.p_id=mu.id
> where mu.id >= '20061016'and mu.id <= '20070216'
>
> Thank's
>
> Hugo
> Cibernetica de México