🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.data.sql
Article #4

Re: Forcing vdb7 to use indices in sql-queries?

#4
From: Steve Koterski
Date: Fri, 27 Feb 1998 00:00
48 lines
2808 bytes
On Fri, 27 Feb 1998 17:40:25 -0500, Peter Rorlick <peter@InjuryTracker.com>
wrote:

>Steve Koterski wrote:
>
>> More information, please:
>>
>> What type of local table? dBASE or Paradox? What level table?
>
>dBase level 7.
>
>> What type of index was used? Primary or secondary? Single- or
>> multi-column?
>> dBASE expression index?
>
>Index on Customer_ID tag CustNo
>In other words, to a tag in an MDX.
>BTW what are primary/secondary indexes? I've developed in xbase for 16
>years and I've never encountered that phrase.

<GRIN>
Visual dBASE 7 introduced a number of new features to the dBASE table
format. (Features bringing dBASE tables somewhat up to the '90s.)
</GRIN>

One of the new features is the primary index. Previously, all dBASE indexes
were secondary indexes. Now, you can have a primary index, too. Primary
indexes allow only unique values in the field that compose the index and
are supposed to be uatomatically used as the default sort order for a
table.

My questions were centered mostly on the table type and and whether simple
or compound. My own testing has verified that dBASE simple indexes (which
is what yours is, based on a single field) are used by SELECT queries.
Queries with an ORDER BY clause would ordinarily be read-only, but
existence of an index for the fields in the ORDER BY clause allows the
query to be updatable.

What is your exact SQL statement. I would be looking at the joining fields
and field comparisons in the WHERE clause (if there is one), looking in the
context of the index information you have already provided.

**************************************************************************
Steve Koterski
Borland International, Inc.
http://www.borland.com/delphi
(Remove the "SPICEDHAM2" from the address. Death to spam-bots!)
Technical Details
Message-ID: <34f950a4.26724959@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34F4904B.7200@ping.de> <34F49515.16C0@borland.com> <34F62866.E950F244@InjuryTracker.com> <34f6f7c6.3971607@forums.borland.com> <34F740D9.9990DA28@InjuryTracker.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 105c7d,d5b52dc183f66711
X-Google-Attributes: gid105c7d,public
X-Google-Thread: 108edc,d5b52dc183f66711
X-Google-Attributes: gid108edc,public
X-Google-Thread: ff5a1,d5b52dc183f66711
X-Google-Attributes: gidff5a1,public
From: koterski@SPICEDHAM2borland.com (Steve Koterski)
Subject: Re: Forcing vdb7 to use indices in sql-queries?
Date: 1998/02/27
Message-ID: <34f950a4.26724959@forums.borland.com>
X-Deja-AN: 329310101
Content-Transfer-Encoding: 7bit
References: <34F4904B.7200@ping.de> <34F49515.16C0@borland.com> <34F62866.E950F244@InjuryTracker.com> <34f6f7c6.3971607@forums.borland.com> <34F740D9.9990DA28@InjuryTracker.com>
Mime-Version: 1.0
Reply-To: koterski@SPICEDHAM2borland.com
Content-Type: text/plain; charset=us-ascii
Organization: Borland International, Technical Publications
Newsgroups: borland.public.vdbase.data.sql,borland.public.vdbase.data.bde,borland.public.vdbase.programming