dbTalk Databases Forums  

indexing

comp.databases.filemaker comp.databases.filemaker


Discuss indexing in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ursus
 
Posts: n/a

Default indexing - 04-20-2007 , 04:49 AM






Fmp 8.5 Adv, windows

Just to gather my thoughts, it does work, but any imput apreciated.

I have a search field, calculated from various fields in the solution. I
wanted to present the user with the option to include/exclude certain
fields. So I created a include/exclude value list, created a global field
(gInfoYN) where they make their choise. And included an If in the
searchfield.
If ( gInfoYN = "Include" ; MyTable::Info ; "" )
But now the calculation suddenly has a global inside it, and although the
contents of the gfield itself is not present inside the calculation (only
used for the IF) the search field can no longer be indexed. Which seriously
cripples the search speed.

Now I created two variables and a scipt that governs the values in these
values. The fields are now buttons that trigger the script. The sript
toggels the visible value from yes to no and the contents from the variable
as well. Now I put the variable inside the calc and I am able to set the
indexing on again.

Keep well, Ursus



Reply With Quote
  #2  
Old   
Ursus
 
Posts: n/a

Default Re: indexing - 04-20-2007 , 05:51 AM






Ok, but now I have run into the trouble that the calc field does not update
after I changed the gInfoYN contents. I have tried a refresh in the script
and a commit (and even both). Really want the search field to be indexed. So
any thoughts on this?

Keep well, Ursus



Reply With Quote
  #3  
Old   
d-42
 
Posts: n/a

Default Re: indexing - 04-20-2007 , 10:06 AM



On Apr 20, 2:49 am, "Ursus" <ursus.k... (AT) wanadoo (DOT) nl> wrote:
Quote:
Fmp 8.5 Adv, windows

Just to gather my thoughts, it does work, but any imput apreciated.

I have a search field, calculated from various fields in the solution. I
wanted to present the user with the option to include/exclude certain
fields. So I created a include/exclude value list, created a global field
(gInfoYN) where they make their choise. And included an If in the
searchfield.
If ( gInfoYN = "Include" ; MyTable::Info ; "" )
But now the calculation suddenly has a global inside it, and although the
contents of the gfield itself is not present inside the calculation (only
used for the IF) the search field can no longer be indexed. Which seriously
cripples the search speed.

Now I created two variables and a scipt that governs the values in these
values. The fields are now buttons that trigger the script. The sript
toggels the visible value from yes to no and the contents from the variable
as well. Now I put the variable inside the calc and I am able to set the
indexing on again.
You simply can't have a field that is both indexed and changes on the
fly accross an entire database at the flick of a switch.

There ARE some options though. If the database is gauranteed to be
very small, you can have the switch from gInfoYN call a 'replace' on
the field with the new value. This will limited by the speed of the
replace.

Another option is to is to use 3 fields:
One with the extra data
One without the extra data
and one as an unstored calc that displayes the data based on gInfo.

You'll have to set it up so that when you perform a find, you do it on
the appropriate 'behind the scenes' field which is indexed.

Hope that helps,
Dave



Reply With Quote
  #4  
Old   
Ursus
 
Posts: n/a

Default Re: indexing - 04-22-2007 , 02:42 PM



Quote:
Now I created two variables and a scipt that governs the values in these
values. The fields are now buttons that trigger the script. The sript
toggels the visible value from yes to no and the contents from the
variable
as well. Now I put the variable inside the calc and I am able to set the
indexing on again.

You simply can't have a field that is both indexed and changes on the
fly accross an entire database at the flick of a switch.

There ARE some options though. If the database is gauranteed to be
very small, you can have the switch from gInfoYN call a 'replace' on
the field with the new value. This will limited by the speed of the
replace.

Another option is to is to use 3 fields:
One with the extra data
One without the extra data
and one as an unstored calc that displayes the data based on gInfo.

You'll have to set it up so that when you perform a find, you do it on
the appropriate 'behind the scenes' field which is indexed.

Hope that helps,
Dave

I just thought to create a completely new field. This would be normally
empty. Include this field in the calculation. Then when the script is run
set an x inside the field and reset it to empty. This way the calculation is
triggered and the index rebuild. Might not be very neat, but works non the
less.

Keep well, Ursus




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.