Re: [sqlite] Setting boundaries in a search

2014-07-17 Thread RSmith
On 2014/07/17 03:48, RSmith wrote: In a similar fashion I had made this system for basically loading CSV files into an SQLite DB, then running all kinds of rules on it//.. (btw: This app is freely shared if anyone needs something of the kind or fancy testing the above, just mail me) I

Re: [sqlite] Setting boundaries in a search

2014-07-17 Thread Kees Nuyt
On Thu, 17 Jul 2014 13:06:36 +0530, Sky Meena wrote: > how to set a password to open a sqlite db in sqlite browser Answered in a different thread 2 minutes ago. -- Regards, Kees Nuyt >On Thu, Jul 17, 2014 at 7:18 AM, RSmith wrote: > >> >> On

Re: [sqlite] Setting boundaries in a search

2014-07-17 Thread Sky Meena
how to set a password to open a sqlite db in sqlite browser On Thu, Jul 17, 2014 at 7:18 AM, RSmith wrote: > > On 2014/07/16 14:55, Rob Willett wrote: > > I’ll second what Simon says, I use the very same technique for a table >> with 4M+ records in and its so fast I

Re: [sqlite] Setting boundaries in a search

2014-07-16 Thread RSmith
On 2014/07/16 14:55, Rob Willett wrote: I’ll second what Simon says, I use the very same technique for a table with 4M+ records in and its so fast I thought I had an error and looked for bugs in my code. I >assumed (incorrectly) that it would be very slow, It isn’t. In a similar fashion I

Re: [sqlite] Setting boundaries in a search

2014-07-16 Thread jose isaias cabrera
"Simon Slavin" wrote... On 16 Jul 2014, at 1:23pm, jose isaias cabrera wrote: "Simon Slavin" wrote... CREATE INDEX sci ON startcodes (code,id) You will find that that SELECT will then be blisteringly fast even with millions of rows in your table. I do have

Re: [sqlite] Setting boundaries in a search

2014-07-16 Thread jose isaias cabrera
"RSmith" wrote... On 2014/07/16 14:23, jose isaias cabrera wrote: "Simon Slavin" wrote... That way is not particularly slow. You just need to have a good index. A good index for that search would be CREATE INDEX sci ON startcodes (code,id) You will find that that SELECT will then be

Re: [sqlite] Setting boundaries in a search

2014-07-16 Thread jose isaias cabrera
"Rob Willett" wrote... Hi, Can I add my very first piece of advice after listening and reading for the last 6-9 months :) I’ll second what Simon says, I use the very same technique for a table with 4M+ records in and its so fast I thought I had an error and looked for bugs in my code. I

Re: [sqlite] Setting boundaries in a search

2014-07-16 Thread Rob Willett
All my searches are unique and go across the whole table. The range I select from us normally between 500 and 600 rows. I benchmarked the select over the growth of the database to circa 4m records and the slowdown was negligible. I'm not looking at optimising it as I have far better

Re: [sqlite] Setting boundaries in a search

2014-07-16 Thread Simon Slavin
On 16 Jul 2014, at 1:23pm, jose isaias cabrera wrote: > "Simon Slavin" wrote... > >> CREATE INDEX sci ON startcodes (code,id) >> >> You will find that that SELECT will then be blisteringly fast even with >> millions of rows in your table. > > I do have that INDEX for

Re: [sqlite] Setting boundaries in a search

2014-07-16 Thread RSmith
On 2014/07/16 14:23, jose isaias cabrera wrote: "Simon Slavin" wrote... That way is not particularly slow. You just need to have a good index. A good index for that search would be CREATE INDEX sci ON startcodes (code,id) You will find that that SELECT will then be blisteringly fast even

Re: [sqlite] Setting boundaries in a search

2014-07-16 Thread Rob Willett
Hi, Can I add my very first piece of advice after listening and reading for the last 6-9 months :) I’ll second what Simon says, I use the very same technique for a table with 4M+ records in and its so fast I thought I had an error and looked for bugs in my code. I assumed (incorrectly) that

Re: [sqlite] Setting boundaries in a search

2014-07-16 Thread jose isaias cabrera
"Simon Slavin" wrote... On 16 Jul 2014, at 3:21am, jose isaias cabrera wrote: SELECT * from startcodes where code = 'e'; but I want to search only from id >= 8 and <= 14. Is there a way to set the boundary for that SELECT that will only search ids 8-14? I know I

Re: [sqlite] Setting boundaries in a search

2014-07-16 Thread jose isaias cabrera
"Igor Tandetnik" wrote... On 7/15/2014 10:21 PM, jose isaias cabrera wrote: SELECT * from startcodes where code = 'e'; but I want to search only from id >= 8 and <= 14. Just say so: SELECT * from startcodes where code = 'e' and id between 8 and 14; I know I can do a WHERE id BETWEEN 8

Re: [sqlite] Setting boundaries in a search

2014-07-15 Thread Simon Slavin
> On 16 Jul 2014, at 3:21am, jose isaias cabrera wrote: > > SELECT * from startcodes where code = 'e'; > > but I want to search only from id >= 8 and <= 14. Is there a way to set the > boundary for that SELECT that will only search ids 8-14? I know I can do a > WHERE

Re: [sqlite] Setting boundaries in a search

2014-07-15 Thread Igor Tandetnik
On 7/15/2014 10:21 PM, jose isaias cabrera wrote: SELECT * from startcodes where code = 'e'; but I want to search only from id >= 8 and <= 14. Just say so: SELECT * from startcodes where code = 'e' and id between 8 and 14; I know I can do a WHERE id BETWEEN 8 AND 14, but is there another

[sqlite] Setting boundaries in a search

2014-07-15 Thread jose isaias cabrera
Greetings. Pardon the newbie question, but is there a way to set boundaries on a search? Imagine this scenario: startcodes id,code,date 1,a,2014-08-06 2,b,2014-08-06 3,z,2014-08-06 4,g,2014-08-06 5,g,2014-08-06 6,j,2014-08-06 7,p,2014-08-06 8,t,2014-08-06 9,e,2014-08-06 10,w,2014-08-06