Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Index on RI field
Mon, Jul 17 2006 2:57 PMPermanent Link

"Samuel Loeman"
I have a one to many relationship between Department and Staff. Is there any
way to define an index on 'Department.Name, Staff.Name', ie include a lookup
field in an index definition ? I know I can use the lookup code in the
index, but that means the lookup values will not be sorted alphabetically.

Alternatively, if I use a query instead and sort on the lookup values, will
I get the same performance as using a table (providing the lookup code is
indexed) ?

Thanks

Tue, Jul 18 2006 5:47 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Samuel,

<<I have a one to many relationship between Department and Staff. Is there
any way to define an index on 'Department.Name, Staff.Name', ie include a
lookup field in an index definition ? I know I can use the lookup code in
the index, but that means the lookup values will not be sorted
alphabetically. >>

Unfortunately, no.

<< Alternatively, if I use a query instead and sort on the lookup values,
will I get the same performance as using a table (providing the lookup code
is indexed) ? >>

No, it will be slower than just a normal table due to the time needed to
generate the result set.  You can try dumping the result set into an
in-memory table via the INTO '\Memory\MyTempTable' syntax in the SELECT
statement:

http://www.elevatesoft.com/dbisam4d5_naming_conventions.htm

that may help speed things up a bit.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image