Re: [sqlite] how to speed up this ?

2010-12-24 Thread Vander Clock Stephane
> Select >H1.ID > from >HASH1 H1 > where >x1_y1 BETWEEN min11 AND max11 AND >x1_y2 BETWEEN min12 AND max12 AND >x1_y3 BETWEEN min13 AND max13 AND >x1_y4 BETWEEN min14 AND max14 AND >x1_y5 BETWEEN min15 AND max15; > > no it's not work at all !! without an rtree index th

Re: [sqlite] how to speed up this ?

2010-12-24 Thread Vander Clock Stephane
i do it.. but it's change nothing :( On 12/24/2010 3:47 PM, Simon Slavin wrote: > On 24 Dec 2010, at 8:17am, Vander Clock Stephane wrote: > >> I have a key like this >> >> 123-098-230-120-111 where (123), (098), (230), (120), (111) are what i >> call node >> Node are integer comprise between 0 and

Re: [sqlite] how to speed up this ?

2010-12-24 Thread Simon Slavin
On 24 Dec 2010, at 12:47pm, Simon Slavin wrote: > Precalculate five sets of minimum and maximum bounds: > > min11 = max((<#randomnumber> % 255)-10,0) > max11 = min((<#randomnumber> % 255)+10,255) > > Then you can just seize the ten values you need from the table and use them > to make up you

Re: [sqlite] how to speed up this ?

2010-12-24 Thread Simon Slavin
On 24 Dec 2010, at 8:17am, Vander Clock Stephane wrote: > I have a key like this > > 123-098-230-120-111 where (123), (098), (230), (120), (111) are what i > call node > Node are integer comprise between 0 and 255 (bytes) You mean from 000 to 254. 255 breaks your system because you are using

Re: [sqlite] how to speed up this ?

2010-12-24 Thread Vander Clock Stephane
can you gave me the name of a good SSD you advise me to buy ? i decide to make a try ! Thanks again stéphane On 12/24/2010 12:24 AM, John Drescher wrote: > On Thu, Dec 23, 2010 at 4:06 PM, Vander Clock Stephane > wrote: >> that very very much expensive :( how much you thing ? >> > $500 to $600

Re: [sqlite] how to speed up this ?

2010-12-24 Thread Vander Clock Stephane
> Can you describe what you're trying to do with that command ? of course ! I have a key like this 123-098-230-120-111 where (123), (098), (230), (120), (111) are what i call node Node are integer comprise between 0 and 255 (bytes) and i need to found "similare" key. A similar key is a key wh

Re: [sqlite] how to speed up this ?

2010-12-23 Thread Vander Clock Stephane
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

Re: [sqlite] how to speed up this ?

2010-12-23 Thread Simon Slavin
On 23 Dec 2010, at 8:19pm, Vander Clock Stephane wrote: > in my test all the random are different ... Can you describe what you're trying to do with that command ? Or can anyone else explain to me what Stephane is trying to do ? I don't see the point of a construction like this Select H1.

Re: [sqlite] how to speed up this ?

2010-12-23 Thread stormtrooper
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 spat

Re: [sqlite] how to speed up this ?

2010-12-23 Thread John Drescher
On Thu, Dec 23, 2010 at 4:06 PM, Vander Clock Stephane wrote: > that very very much expensive :( how much you thing ? > $500 to $600 US. John ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-u

Re: [sqlite] how to speed up this ?

2010-12-23 Thread Vander Clock Stephane
that very very much expensive :( how much you thing ? On 12/23/2010 11:55 PM, John Drescher wrote: >> i m affraid so ... but what it's will be with 50 000 000 rows ? i don't >> have 100 gigabytes of memory :( > I would get a 256GB SSD. > > John > ___ >

Re: [sqlite] how to speed up this ?

2010-12-23 Thread Vander Clock Stephane
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 t

Re: [sqlite] how to speed up this ?

2010-12-23 Thread John Drescher
> i m affraid so ... but what it's will be with 50 000 000 rows ? i don't > have 100 gigabytes of memory :( I would get a 256GB SSD. John ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] how to speed up this ?

2010-12-23 Thread stormtrooper
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);

Re: [sqlite] how to speed up this ?

2010-12-23 Thread Vander Clock Stephane
> Right. So you have a database with 2 000 000 rows that is 1.8GB > So your first 1 000 000 rows takes up about 1GB. > And your test case with just 1 000 000 rows in runs really fast. > > So what is happening is that most of the first 1 000 000 rows fits in memory. > Once the database gets bigg

Re: [sqlite] how to speed up this ?

2010-12-23 Thread Simon Slavin
On 23 Dec 2010, at 7:56pm, Vander Clock Stephane wrote: > Windows 2008 R2 with 8GB of memory. > > but actually i run the test on a beta server with only 1Gb of memory and > win2003 .. > > the database si with 2 000 000 rows is 1.8 GO Right. So you have a database with 2 000 000 rows that is

Re: [sqlite] how to speed up this ?

2010-12-23 Thread Vander Clock Stephane
Windows 2008 R2 with 8GB of memory. but actually i run the test on a beta server with only 1Gb of memory and win2003 .. the database si with 2 000 000 rows is 1.8 GO thanks by advance ! stéphane On 12/23/2010 10:52 PM, Simon Slavin wrote: > On 23 Dec 2010, at 7:36pm, Vander Clock Stephane wrot

Re: [sqlite] how to speed up this ?

2010-12-23 Thread Simon Slavin
On 23 Dec 2010, at 7:36pm, Vander Clock Stephane wrote: > when their is lower than 1 000 000 row it's return in lower than 10 ms > with more than 1 000 000 row it's return with around 350 ms :( > and i need more than 50 000 000 rows :( :( How much memory do you have in that computer ? What oper