Re: [sqlite] Questions on views

2007-03-27 Thread drh
"Dennis Volodomanov" <[EMAIL PROTECTED]> wrote: > Ok, thank you for clarifying those points to me. > > At the moment I'm struggling to understand why running a > > SELECT ROWID FROM TableA WHERE colA='a' > > Takes almost twice as long as > > SELECT ROWID FROM TableA WHERE colA='b' > > Running

RE: [sqlite] Questions on views

2007-03-27 Thread Dennis Volodomanov
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 28, 2007 10:59 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Questions on views > > "Dennis Volodomanov" <[EMAIL PROTECTED]> wrote: > > Tha

Re: [sqlite] Questions on views

2007-03-27 Thread drh
"Dennis Volodomanov" <[EMAIL PROTECTED]> wrote: > Thank you for the reply. > > > > One more question that I was pondering upon - does the > > order of rows > > > and their placement in the table matter at all when using indexes > > > (provided indexes are used correctly)? > > > > I don't

RE: [sqlite] Questions on views

2007-03-27 Thread Dennis Volodomanov
Sent: Wednesday, March 28, 2007 10:31 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Questions on views > > "Dennis Volodomanov" <[EMAIL PROTECTED]> wrote: > > One more question that I was pondering upon - does the > order of rows > > an

Re: [sqlite] Questions on views

2007-03-27 Thread drh
"Dennis Volodomanov" <[EMAIL PROTECTED]> wrote: > One more question that I was pondering upon - does the order of rows and > their placement in the table matter at all when using indexes (provided > indexes are used correctly)? I don't really understand the question... > > Oh, and another :)

RE: [sqlite] Questions on views

2007-03-27 Thread Dennis Volodomanov
gt; Subject: Re: [sqlite] Questions on views > > Dennis Volodomanov wrote: > > I might not go down the threading path at all, as in theory it > > wouldn't gain me that much - I'd still need to lock/unlock the > > database for each of the threads and I think the overhead > of

RE: [sqlite] Questions on views

2007-03-27 Thread Dennis Volodomanov
s@sqlite.org > Subject: Re: [sqlite] Questions on views > > Dennis Volodomanov wrote: > > I might not go down the threading path at all, as in theory it > > wouldn't gain me that much - I'd still need to lock/unlock the > > database for each of the threads and I think the

RE: [sqlite] Questions on views

2007-03-27 Thread Dennis Volodomanov
7, 2007 8:59 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Questions on views > > Dennis Volodomanov wrote: > > > [...] > > The reason that such a huge amount of statements needs to > be executed > > so many times very quickly is that we have a

Re: [sqlite] Questions on views

2007-03-27 Thread bartsmissaert
> at least for anyone who has worked with > assembly level programming That are not many then, but thanks and will have a look at the documentation you mentioned. RBS > [EMAIL PROTECTED] wrote: >> Is there any documentation about how to analyze the results of EXPLAIN? >> Or even better is there

Re: [sqlite] Questions on views

2007-03-27 Thread Dennis Cote
[EMAIL PROTECTED] wrote: Is there any documentation about how to analyze the results of EXPLAIN? Or even better is there a utility that could analyze (at least to some extent) the results for you? The documentation you need is in the VDBE tutorial at http://www.sqlite.org/vdbe.html and the

Re: [sqlite] Questions on views

2007-03-27 Thread Dennis Cote
Dennis Volodomanov wrote: I might not go down the threading path at all, as in theory it wouldn't gain me that much - I'd still need to lock/unlock the database for each of the threads and I think the overhead of that plus the fact that it will have to wait for the other thread to do its stuff

Re: [sqlite] Questions on views

2007-03-27 Thread bartsmissaert
Is there any documentation about how to analyze the results of EXPLAIN? Or even better is there a utility that could analyze (at least to some extent) the results for you? RBS > Joe Wilson wrote: >> >> "EXPLAIN SELECT ..." is also a good way to find out what the queries are >> doing >> if you're

Re: [sqlite] Questions on views

2007-03-27 Thread Dennis Cote
Joe Wilson wrote: "EXPLAIN SELECT ..." is also a good way to find out what the queries are doing if you're prepared to decipher the opcodes. Joe, I had looked at the explain output and it wasn't clear which would be faster. The count method produces less VDBE code but involves calls to

Re: [sqlite] Questions on views

2007-03-27 Thread Martin Jenkins
Dennis Volodomanov wrote: [...] The reason that such a huge amount of statements needs to be executed so many times very quickly is that we have a tree built up based on those statements and that tree needs to be pruned if the results of statements are empty in real-time as the user is typing a

RE: [sqlite] Questions on views

2007-03-27 Thread Dennis Volodomanov
TECTED] > Sent: Tuesday, March 27, 2007 5:40 PM > To: sqlite-users@sqlite.org > Subject: RE: [sqlite] Questions on views > > I'd be interested in knowing the performance improvements > your able to achieve from threading. I would be in debt if > you'd post the resu

RE: [sqlite] Questions on views

2007-03-26 Thread Dennis Volodomanov
Yes, threading is one option I'm testing and timing as well. > -Original Message- > From: Joe Wilson [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 27, 2007 12:29 PM > To: sqlite-users@sqlite.org > Subject: RE: [sqlite] Questions on views > > Assuming you're

RE: [sqlite] Questions on views

2007-03-26 Thread Joe Wilson
Assuming you're running on multi-core machines, spread the work over a few threads/connections. --- Dennis Volodomanov <[EMAIL PROTECTED]> wrote: > Oops - that last sentence I wrote actually doesn't make sense :) I know > what prepared statements are as I'm using them (doh!). I might have a >

RE: [sqlite] Questions on views

2007-03-26 Thread Dennis Volodomanov
e know all possible combinations. Still - I'll give this some thought to see if I can find something in this direction. Thanks again. > -Original Message- > From: Dennis Volodomanov > Sent: Tuesday, March 27, 2007 11:43 AM > To: sqlite-users@sqlite.org > Subject: RE: [s

RE: [sqlite] Questions on views

2007-03-26 Thread Dennis Volodomanov
some reading on it now. I'll get back with results if I succeed in implementing it. Regards, Dennis > -Original Message- > From: Joe Wilson [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 27, 2007 11:31 AM > To: sqlite-users@sqlite.org > Subject: RE: [sqlite] Que

RE: [sqlite] Questions on views

2007-03-26 Thread Joe Wilson
--- Dennis Volodomanov <[EMAIL PROTECTED]> wrote: > Yes, after timing both I found that SELECT EXISTS is actually a tiny bit > faster, which does matter when multiplied by thousands of executions in > a row. > > Unfortunately, I still cannot get it as fast as I want - it takes > approximately

RE: [sqlite] Questions on views

2007-03-26 Thread Dennis Volodomanov
, but can I do anything else? Thanks! Dennis > -Original Message- > From: Dennis Cote [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 27, 2007 12:35 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Questions on views > > Dennis Volodomanov wrote: > &g

Re: [sqlite] Questions on views

2007-03-26 Thread Joe Wilson
--- Dennis Cote <[EMAIL PROTECTED]> wrote: > Dennis Volodomanov wrote: > > Is doing a SELECT EXISTS (...) faster than a SELECT COUNT (... LIMIT 1) > > or would it be the same (I would expect them to be the same, but that's > > only my guess)? > > > I would expect them to be very nearly the

Re: [sqlite] Questions on views

2007-03-26 Thread Dennis Cote
Dennis Volodomanov wrote: Is doing a SELECT EXISTS (...) faster than a SELECT COUNT (... LIMIT 1) or would it be the same (I would expect them to be the same, but that's only my guess)? I would expect them to be very nearly the same. Any difference would only be apparent if you repeat them

RE: [sqlite] Questions on views

2007-03-25 Thread Dennis Volodomanov
> Sent: Saturday, March 24, 2007 1:47 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Questions on views > > Dennis Volodomanov wrote: > > > > Is it quicker (slower or the same) to execute a query on a > view or to > > execute the original query from

Re: [sqlite] Questions on views

2007-03-23 Thread Dennis Cote
Dennis Volodomanov wrote: Is it quicker (slower or the same) to execute a query on a view or to execute the original query from which this view was created? I'm basically looking for the best (fastest) way to execute thousands of queries to check whether they return any results or not. At

[sqlite] Questions on views

2007-03-22 Thread Dennis Volodomanov
Hello all, Is it quicker (slower or the same) to execute a query on a view or to execute the original query from which this view was created? I'm basically looking for the best (fastest) way to execute thousands of queries to check whether they return any results or not. At the moment I'm