hmmm,

how spatial index can help me better than sqlite Rtree index ?

i just need to do

Select
     H1.ID
from
     HASH1 H1
where
     x1_y1_min>= x and
     x1_y1_max<= y and
     x1_y2_min>= z and
     x1_y2_max<= w and
     x1_y3_min>= a and
     x1_y3_max<= b and
     x1_y4_min>= c and
     x1_y4_max<= d and
     x1_y5_min>= e and
     x1_y5_max<= f;

thanks by advance
stéphane



On 12/24/2010 12:40 AM, stormtrooper wrote:
> I'd be surprised if you run out of memory, updating a field, even with a
> 50,000,000 row table.
>
> Also, if you are working with real geospatial data such as Imagery or vector
> data, there are many applications that may be suited for these calculations.
>
> Spatialite is a Sqlite extension that has spatial indexes(rtree) and spatial
> functions such as buffer, intersect,etc
>
>
>
> Vander Clock Stephane wrote:
>> i don't know but i quite sure not, because the cost to update all the
>> row in the table Hash will be much much (much) more expensive ...
>> and also this solution it's absolutely not multi thread :(
>>
>> On 12/23/2010 11:46 PM, stormtrooper wrote:
>>> would it run faster if you add two columns to the Hast table - randmax
>>> and
>>> randmin
>>>
>>> update Hash set randmax = max((<#randomnumber>   % 255)-10,0)
>>> update Hash set randmin = min((<#randomnumber>   % 255)+10,255)
>>>
>>> CREATE INDEX HASH_RMIN_IDX ON HASH (RANDMIN);
>>> CREATE INDEX HASH_RMAX_IDX ON HASH (RANDMAX);
>>>
>>> Select
>>>      H1.ID
>>> from
>>>      HASH1 H1
>>> where
>>>      x1_y1_min>= randmax and
>>>      x1_y1_max<= randmin and
>>>      x1_y2_min>= randmax and
>>>      x1_y2_max<= randmin and
>>>      x1_y3_min>= randmax and
>>>      x1_y3_max<= randmin and
>>>      x1_y4_min>= randmax and
>>>      x1_y4_max<= randmin and
>>>      x1_y5_min>= randmax and
>>>      x1_y5_max<= randmin;
>>> _______________________________________________
>>> sqlite-users mailing list
>>> sqlite-users@sqlite.org
>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>>>
>>>
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to