Re: [sqlite] What is faster?

2008-04-29 Thread Cory Nelson
When it is so easy to test, who cares about theoretical answers?  It's
been 5 days since you asked and would have taken 5 minutes to test!
Try It And See(tm).

On Tue, Apr 29, 2008 at 11:53 AM, Alexander Batyrshin <[EMAIL PROTECTED]> wrote:
> I am more interesting in theoretical answer :)
>
>
>
>  On Fri, Apr 25, 2008 at 5:24 PM, Federico Granata
>  <[EMAIL PROTECTED]> wrote:
>  > If you are under linux you can use "time" command to execute sqlite with
>  >  various query and see which one is faster.
>  >
>  >  --
>  >  [image: Just A Little Bit Of
>  >  
> Geekness]
>  >  Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza.
>  >  (Larry Wall).
>  >
>  >  On Fri, Apr 25, 2008 at 10:04 AM, Alexander Batyrshin <[EMAIL PROTECTED]>
>  >  wrote:
>  >
>  >
>  >
>  >  >  Hello people,
>  >  >
>  >  > I have two SQL commands doing the same thing:
>  >  > 1.
>  >  > SELECT id FROM foo WHERE expr1
>  >  > EXCEPT
>  >  > SELECT id FROM bar WHERE expr2
>  >  >
>  >  > 2.
>  >  > SELECT id FROM foo WHERE expr1 AND id not IN (SELECT id FTOM bar WHERE
>  >  > expr2)
>  >  >
>  >  >
>  >  > Can you say which one is faster? I prefer second option because I can
>  >  > use extra condition like LIMIT.
>  >  >
>  >  > --
>  >  > Alexander Batyrshin aka bash
>  >  > bash = Biomechanica Artificial Sabotage Humanoid
>  >  > ___
>  >  > 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
>  >
>
>
>
>  --
>
>
> Alexander Batyrshin aka bash
>  bash = Biomechanica Artificial Sabotage Humanoid
>  ___
>  sqlite-users mailing list
>  sqlite-users@sqlite.org
>  http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Cory Nelson
http://www.int64.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What is faster?

2008-04-29 Thread Alexander Batyrshin
I am more interesting in theoretical answer :)

On Fri, Apr 25, 2008 at 5:24 PM, Federico Granata
<[EMAIL PROTECTED]> wrote:
> If you are under linux you can use "time" command to execute sqlite with
>  various query and see which one is faster.
>
>  --
>  [image: Just A Little Bit Of
>  Geekness]
>  Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza.
>  (Larry Wall).
>
>  On Fri, Apr 25, 2008 at 10:04 AM, Alexander Batyrshin <[EMAIL PROTECTED]>
>  wrote:
>
>
>
>  >  Hello people,
>  >
>  > I have two SQL commands doing the same thing:
>  > 1.
>  > SELECT id FROM foo WHERE expr1
>  > EXCEPT
>  > SELECT id FROM bar WHERE expr2
>  >
>  > 2.
>  > SELECT id FROM foo WHERE expr1 AND id not IN (SELECT id FTOM bar WHERE
>  > expr2)
>  >
>  >
>  > Can you say which one is faster? I prefer second option because I can
>  > use extra condition like LIMIT.
>  >
>  > --
>  > Alexander Batyrshin aka bash
>  > bash = Biomechanica Artificial Sabotage Humanoid
>  > ___
>  > 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
>



-- 
Alexander Batyrshin aka bash
bash = Biomechanica Artificial Sabotage Humanoid
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What is faster?

2008-04-25 Thread Federico Granata
If you are under linux you can use "time" command to execute sqlite with
various query and see which one is faster.

--
[image: Just A Little Bit Of
Geekness]
Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza.
(Larry Wall).

On Fri, Apr 25, 2008 at 10:04 AM, Alexander Batyrshin <[EMAIL PROTECTED]>
wrote:

>  Hello people,
>
> I have two SQL commands doing the same thing:
> 1.
> SELECT id FROM foo WHERE expr1
> EXCEPT
> SELECT id FROM bar WHERE expr2
>
> 2.
> SELECT id FROM foo WHERE expr1 AND id not IN (SELECT id FTOM bar WHERE
> expr2)
>
>
> Can you say which one is faster? I prefer second option because I can
> use extra condition like LIMIT.
>
> --
> Alexander Batyrshin aka bash
> bash = Biomechanica Artificial Sabotage Humanoid
> ___
> 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


Re: [sqlite] what is faster?

2006-04-17 Thread Cesar David Rodas Maldonado
Thanks Richard Hipp and it will be more easy to use all in one file...

thanks for your help


On 4/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> "Cesar David Rodas Maldonado" <[EMAIL PROTECTED]> wrote:
> > any one can answer me?
> >
> > On 4/15/06, Cesar David Rodas Maldonado <[EMAIL PROTECTED]> wrote:
> > >
> > >  Hello
> > >
> > > I have a software that uses four tables.
> > >
> > > that's ok.. but i wanna know if is faster if i use for every table a
> > > database ( a file) or if is the same thing in velocity if a put all
> the
> > > tables in one file, couse every table uses a lot of data.
> > >
>
> I expect them to be about the same speed.
> --
> D. Richard Hipp   <[EMAIL PROTECTED]>
>
>


Re: [sqlite] what is faster?

2006-04-16 Thread drh
"Cesar David Rodas Maldonado" <[EMAIL PROTECTED]> wrote:
> any one can answer me?
> 
> On 4/15/06, Cesar David Rodas Maldonado <[EMAIL PROTECTED]> wrote:
> >
> >  Hello
> >
> > I have a software that uses four tables.
> >
> > that's ok.. but i wanna know if is faster if i use for every table a
> > database ( a file) or if is the same thing in velocity if a put all the
> > tables in one file, couse every table uses a lot of data.
> >

I expect them to be about the same speed.
--
D. Richard Hipp   <[EMAIL PROTECTED]>



[sqlite] what is faster?

2006-04-15 Thread Cesar David Rodas Maldonado
Hello

I have a software that uses four tables.

that's ok.. but i wanna know if is faster if i use for every table a
database ( a file) or if is the same thing in velocity if a put all the
tables in one file, couse every table uses a lot of data.

thanks