Queries. Question to all

erne ernestogiannotta at tiscalinet.it
Wed Jun 30 16:02:08 CDT 2004


on 30-06-2004 13:27, Ruslan Zasukhin at sunshine at public.kherson.ua wrote:

>>> Should we change this in 2.0 ?
>>> I think no.
>>> 
>> 
>> FoxPro/dBase does case sensitive search
>> but allow specify Upper(Field) in the index expression
>> 
>> all in all very similar to build indexed BaseObject methods
>> only indexes are separate from the DB structure
> 
>> while BaseObject methods are not
>> and this is less flexible
>> expecially when using static classes methods to build the DB
> 
> Hi Erne,
> 
> On the other hand when you use BaseObject method in the query, you
> 
> 1) can be sure that all will work AS YOU have ask
> 
> 2) there is no need for any kind of optimizer, which will get crazy trying
> to choose the best index.
> 
> So with BaseObject methods you get ZERO time on optimization of query.
> 

Yep! I forgot to say that FoxPro/dBase does *not* work natively in SQL
so you just choose your wanted index just as you choose the field to search

optimization came later when FoxPro implemented SQL way of search

> We have try to make CREATE INDEX like in foxpro.
> But when index is standalone, when it just exist in db/table,
> And is not linked to any field (like it is in BaseObject methods)
> Then we MUST implement also some kind of analyzer to choose the best index.
> I have decide that we will not spend time on this for now.
> 

on the other hand, since this is a favourite request, you could implement a
NoCase flag when asking for index (just like we have the IndexByWord flag)
then internally convert all string passed to the SQL to match the Case
Insensitive index (you choose whether better to Uppercase or Lowercase
everything)



Cool Runnings,
Erne.
-- 
| e r |  Ernesto Giannotta
| n e |  Musical Box - a media store
                   




More information about the Valentina mailing list