[sqlite] SELECT performance vs PRIMARY KEY/UNIQUE constraints

2015-05-06 Thread Jay Smith
Nicolas
there are other people who also receive this mail.
if you have code that will help someone else.
Please post the information Mr Hipp requested.

Jay

On Tue, Apr 28, 2015 at 5:08 PM, Nicolas Boullis  wrote:

> Hi,
>
> On Mon, Apr 20, 2015 at 06:25:21AM -0400, Richard Hipp wrote:
> >
> > Please send us:
> >
> > (1) The output of "SELECT sqlite_source_id();"
> >
> > (2) The complete text of you SELECT statement.
> >
> > (3) The output of the ".fullschema" command from the most recent
> > version of the sqlite3.exe command-line shell run on your database
> > file after it is ANALYZE-ed.
>
> Sorry for the very late answer, I?ve been very busy lately.
>
> I investigated a little further, measuring the time taken by each SELECT
> request that was run, and then using EXPLAIN QUERY PLAN to understand
> why two of them were so slow. Knowing the data, I added a few indices,
> and now the whole program runs in about 1 second, much better than what
> I had before.
>
> As far as I am concerned, everything is fine, now. Many thanks for your
> help.
>
> Now, if you are realy interested by that surprisingly-good performance I
> had without indices and without running ANALYZE, I may try to provide
> you with more details.
>
>
> Thanks to all,
>
> --
> Nicolas Boullis
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] building SQLite DLL with Visual C++

2015-04-28 Thread Jay Smith
Bill & Steve
Thanks guys
I am trying to learn and  make some progress with the information you both
provided.

On Mon, Apr 27, 2015 at 9:57 AM, Steven M. McNeese <
steven.mcneese at freedomparkdfw.com> wrote:

> Jay,
>
> I don't do VB.Net development but it should be very similar to C#.Net in
> Visual Studio.  Try to follow these steps:
>
> 1. Add a Dataset Item to your project.  I think you have done this already.
> Once the Dataset is created you will get a blank dataset designer, create a
> connection to your Sqlite database on the server explorer panel.  Drag the
> tables/views you want into the dataset designer.
> 2. Once you save that dataset, you will see the Dataset and corresponding
> Table Adapter in your project components list on the toolbox
> 3. Drag your dataset and table adapter onto your form that contains the
> control that you want to bind to
> 4. In the toolbox under data controls, drag a Binding Source to your form
> 5. Select the binding source and on the properties, set the DataSource to
> your dataset added in step 1; set the data member to the table or view
> added
> to your dataset in step 1
> 6. For each form control you want to bind to a column from your dataset,
> select the control on properties under databindings, click the attribute
> (like Text for a textbox) and drill into the Binding Source created in step
> 4, then the data table and finally the column you want.
>
> Like I said, this is how you do it in C#.net and it is probably very
> similar
> if not exactly the same way for VB.net.
>
> Steve
>
> -Original Message-
> From: sqlite-users-bounces at mailinglists.sqlite.org
> [mailto:sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Drago,
> William @ CSG - NARDA-MITEQ
> Sent: Monday, April 27, 2015 8:38 AM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] building SQLite DLL with Visual C++
>
> I'm afraid I can't help you with that, Jay. I don't use data bindings and
> all that other built-in visual studio db stuff because performance is slow
> and it's hard to maintain. I just read from the db into a data table. From
> there you can do whatever you want with the data.
>
> Search on line for VB.NET examples and I'm sure you'll find some examples.
>
> Good luck,
> --
> Bill Drago
> Senior Engineer
> L3 Narda-MITEQ
> 435 Moreland Road
> Hauppauge, NY 11788
> 631-272-5947 / William.Drago at L-3COM.com
>
>
> > -Original Message-
> > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-
> > users-bounces at mailinglists.sqlite.org] On Behalf Of Jay Smith
> > Sent: Sunday, April 26, 2015 3:44 PM
> > To: General Discussion of SQLite Database
> > Subject: Re: [sqlite] building SQLite DLL with Visual C++
> >
> > Thanks Bill
> >
> > That worked
> >
> > BUT
> >
> > In my form when I go to "DataBindings" I get a Pop-up to "Add Project
> > Datasource" then the 2 screens to choose Datasource Type( I select
> > Database) then I choose DataSet. This is where it breaks down."Choose
> > Data Connection there are 4 choices "Access" and 3 server types, then
> > there is  which I select. And that leaves me with a single
> > "Data provider"
> > Microsoft OLE DB simple provider  This connection works, but is it
> > correct?
> > The connection is MSDAOSP
> >
> > Then I get to the screen "Choose your database objects" and an ERROR
> >
> > "Selecting Objects of type 'Table' is not supported.
> >
> > Then we get to the next part of the problem. I am in my late 70's and
> > have not done any SQL for over 15 years ( I was pretty good at one
> > time.) Where do I go from here.
> >
> > Jay
> >
> > On Sat, Apr 25, 2015 at 5:12 PM, Drago, William @ CSG - NARDA-MITEQ <
> > William.Drago at l-3com.com> wrote:
> >
> > > I don't know what error you're getting so I can't offer specific
> > help.
> > >
> > > This is what works for us:
> > >
> > > Open your project in Visual Studio.
> > >
> > > Click Tools > NuGet Package Manager > Manage NuGet Packages for
> > Solution...
> > >
> > > Select Online > nugget.org
> > >
> > > In the search box enter system.data.sqlite
> > >
> > > A list of packages should be displayed after a short wait.
> > >
> > > Select System.Data.SQLite Core (x86/x64) or, if you need LINQ and
> > > Entity Framework support, select System.Data.SQLite (x86/x64), then
> > > click Install (we use Core here)

[sqlite] building SQLite DLL with Visual C++

2015-04-26 Thread Jay Smith
Thanks Bill

That worked

BUT

In my form when I go to "DataBindings" I get a Pop-up to "Add Project
Datasource" then the 2 screens to choose Datasource Type( I select
Database) then I choose DataSet. This is where it breaks down."Choose Data
Connection there are 4 choices "Access" and 3 server types, then there is
 which I select. And that leaves me with a single "Data provider"
Microsoft OLE DB simple provider  This connection works, but is it correct?
The connection is MSDAOSP

Then I get to the screen "Choose your database objects" and an ERROR

"Selecting Objects of type 'Table' is not supported.

Then we get to the next part of the problem. I am in my late 70's and have
not done any SQL for over 15 years ( I was pretty good at one time.) Where
do I go from here.

Jay

On Sat, Apr 25, 2015 at 5:12 PM, Drago, William @ CSG - NARDA-MITEQ <
William.Drago at l-3com.com> wrote:

> I don't know what error you're getting so I can't offer specific help.
>
> This is what works for us:
>
> Open your project in Visual Studio.
>
> Click Tools > NuGet Package Manager > Manage NuGet Packages for Solution...
>
> Select Online > nugget.org
>
> In the search box enter system.data.sqlite
>
> A list of packages should be displayed after a short wait.
>
> Select System.Data.SQLite Core (x86/x64) or, if you need LINQ and Entity
> Framework support, select System.Data.SQLite (x86/x64), then click Install
> (we use Core here)
>
> After installation you should see a little green checkmark next to the
> package you selected.
>
> Click Close and you're done. Check on line for VB.NET code samples using
> SQLITE.
>
> Good luck,
>
> --
> Bill Drago
> Senior Engineer
> L3 Narda-MITEQ
> 435 Moreland Road
> Hauppauge, NY 11788
> 631-272-5947 / William.Drago at L-3COM.com
>
>
>
> > -Original Message-
> > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-
> > users-bounces at mailinglists.sqlite.org] On Behalf Of Jay Smith
> > Sent: Saturday, April 25, 2015 3:50 PM
> > To: General Discussion of SQLite Database
> > Subject: Re: [sqlite] building SQLite DLL with Visual C++
> >
> > Hi Bill
> >
> > I have been trying for 2 days and I am totally lost.
> >
> > I have NuGet Package Manager. I don't know how to use it.
> >
> > From the  PM>   System.Data.SQLiteI get an error.
> >
> > Can you be a little more specific.
> >
> > Jay
> >
> > On Thu, Apr 23, 2015 at 4:08 PM, Drago, William @ CSG - NARDA-MITEQ <
> > William.Drago at l-3com.com> wrote:
> >
> > > > -Original Message-
> > > > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-
> > > > users-bounces at mailinglists.sqlite.org] On Behalf Of Jay Smith
> > > > Sent: Thursday, April 23, 2015 3:47 PM
> > > > To: General Discussion of SQLite Database
> > > > Subject: Re: [sqlite] building SQLite DLL with Visual C++
> > > >
> > > > Thank you Adam for responding to my post. I have the windows
> > > > binaries downloaded.
> > > >
> > > > At this point I am just following the instructions in the book. And
> > > > I really am not sure what I need the dll for.
> > > >
> > > > Here's the scenario. I have created a program in vb2012. The
> > program
> > > > stores less than 20 fields of data. I am currently saving the data
> > > > in a html format. I just recently discovered SQLite. I am now in
> > the
> > > > process of changing over to a database to store data. I studied SQL
> > > > and Oracle
> > > > 10 years ago. I have almost completed the database for the project.
> > > > My problem is how to integrate the SQL db into my VB program.
> > >
> > > Your subject line says C++, but the line above says VB, so is your
> > > program written in C++ or VB?
> > > If it's VB just get SQLite with NuGet (Tools > NuGet Package Manager,
> > > then search for System.Data.SQLite Core).
> > >
> > > -Bill
> > >
> > >
> > > CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and
> > > any attachments are solely for the use of the addressee and may
> > > contain information that is privileged or confidential. Any
> > > disclosure, use or distribution of the information contained herein
> > is
> > > prohibited. In the event this e-mail contains technical data within
> > > the definition of the Int

[sqlite] building SQLite DLL with Visual C++

2015-04-25 Thread Jay Smith
Hi Bill

I have been trying for 2 days and I am totally lost.

I have NuGet Package Manager. I don't know how to use it.

>From the  PM>   System.Data.SQLiteI get an error.

Can you be a little more specific.

Jay

On Thu, Apr 23, 2015 at 4:08 PM, Drago, William @ CSG - NARDA-MITEQ <
William.Drago at l-3com.com> wrote:

> > -Original Message-
> > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-
> > users-bounces at mailinglists.sqlite.org] On Behalf Of Jay Smith
> > Sent: Thursday, April 23, 2015 3:47 PM
> > To: General Discussion of SQLite Database
> > Subject: Re: [sqlite] building SQLite DLL with Visual C++
> >
> > Thank you Adam for responding to my post. I have the windows binaries
> > downloaded.
> >
> > At this point I am just following the instructions in the book. And I
> > really am not sure what I need the dll for.
> >
> > Here's the scenario. I have created a program in vb2012. The program
> > stores less than 20 fields of data. I am currently saving the data in a
> > html format. I just recently discovered SQLite. I am now in the process
> > of changing over to a database to store data. I studied SQL and Oracle
> > 10 years ago. I have almost completed the database for the project.  My
> > problem is how to integrate the SQL db into my VB program.
>
> Your subject line says C++, but the line above says VB, so is your program
> written in C++ or VB?
> If it's VB just get SQLite with NuGet (Tools > NuGet Package Manager, then
> search for System.Data.SQLite Core).
>
> -Bill
>
>
> CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any
> attachments are solely for the use of the addressee and may contain
> information that is privileged or confidential. Any disclosure, use or
> distribution of the information contained herein is prohibited. In the
> event this e-mail contains technical data within the definition of the
> International Traffic in Arms Regulations or Export Administration
> Regulations, it is subject to the export control laws of the
> U.S.Government. The recipient should check this e-mail and any attachments
> for the presence of viruses as L-3 does not accept any liability associated
> with the transmission of this e-mail. If you have received this
> communication in error, please notify the sender by reply e-mail and
> immediately delete this message and any attachments.
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] building SQLite DLL with Visual C++

2015-04-24 Thread Jay Smith
Thanks Bill
I got in a hurry and was trying to follow the book.
I have never used C++ so the subject line is wrong.
I am now looking into NuGet and will get back if I need more help (and I am
sure I will.)
Jay


On Thu, Apr 23, 2015 at 4:08 PM, Drago, William @ CSG - NARDA-MITEQ <
William.Drago at l-3com.com> wrote:

> > -Original Message-
> > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-
> > users-bounces at mailinglists.sqlite.org] On Behalf Of Jay Smith
> > Sent: Thursday, April 23, 2015 3:47 PM
> > To: General Discussion of SQLite Database
> > Subject: Re: [sqlite] building SQLite DLL with Visual C++
> >
> > Thank you Adam for responding to my post. I have the windows binaries
> > downloaded.
> >
> > At this point I am just following the instructions in the book. And I
> > really am not sure what I need the dll for.
> >
> > Here's the scenario. I have created a program in vb2012. The program
> > stores less than 20 fields of data. I am currently saving the data in a
> > html format. I just recently discovered SQLite. I am now in the process
> > of changing over to a database to store data. I studied SQL and Oracle
> > 10 years ago. I have almost completed the database for the project.  My
> > problem is how to integrate the SQL db into my VB program.
>
> Your subject line says C++, but the line above says VB, so is your program
> written in C++ or VB?
> If it's VB just get SQLite with NuGet (Tools > NuGet Package Manager, then
> search for System.Data.SQLite Core).
>
> -Bill
>
>
> CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any
> attachments are solely for the use of the addressee and may contain
> information that is privileged or confidential. Any disclosure, use or
> distribution of the information contained herein is prohibited. In the
> event this e-mail contains technical data within the definition of the
> International Traffic in Arms Regulations or Export Administration
> Regulations, it is subject to the export control laws of the
> U.S.Government. The recipient should check this e-mail and any attachments
> for the presence of viruses as L-3 does not accept any liability associated
> with the transmission of this e-mail. If you have received this
> communication in error, please notify the sender by reply e-mail and
> immediately delete this message and any attachments.
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] building SQLite DLL with Visual C++

2015-04-24 Thread Jay Smith
Thanks Adam
I will take a look
Jay

On Thu, Apr 23, 2015 at 4:19 PM, Adam Devita  wrote:

> Good day,
> I don't work in VB, so I can't help you in specifics on that. A quick
> search on a search engine  pops up some videos on how to use sqlite in
> a Visual Basic project.  The archives of this list have a lot of
> questions where people are introduced to open, prep sql, (bind), step,
> fetch, finalize, close. It is often a good idea to specify which book
> you are working through for a question relating to a published
> tutorial, as some future person may be reading the same book and could
> find the thread helpful.  Some people on the list likely have a copy
> of the same book on their shelf.  Someone on  this list might even be
> the author.
>
> Adam
>
>
>
>
> On Thu, Apr 23, 2015 at 3:47 PM, Jay Smith  wrote:
> > Thank you Adam for responding to my post. I have the windows binaries
> > downloaded.
> >
> > At this point I am just following the instructions in the book. And I
> > really am not sure what I need the dll for.
> >
> > Here's the scenario. I have created a program in vb2012. The program
> stores
> > less than 20 fields of data. I am currently saving the data in a html
> > format. I just recently discovered SQLite. I am now in the process of
> > changing over to a database to store data. I studied SQL and Oracle 10
> > years ago. I have almost completed the database for the project.  My
> > problem is how to integrate the SQL db into my VB program.
> >
> > On Wed, Apr 22, 2015 at 10:16 AM, Adam Devita 
> wrote:
> >
> >> Good day,
> >>
> >>
> >> Why are you compiling a dll instead of using the pre-compiled windows
> >> binaries at http://www.sqlite.org/download.html?
> >>
> >> Are you adding some sort of extra wrapper?
> >>
> >> Why are you not adding the amalgamated c source in your project (turn
> >> off use pre-compiled headers for that file) ?
> >>
> >> If you insist on creating your own dll, try the vs wizard to create a
> >> dll project, then add code to it.
> >>
> >> regards,
> >> Adam DeVita
> >>
> >>
> >> On Wed, Apr 22, 2015 at 9:51 AM, Igor Tandetnik 
> >> wrote:
> >> > On 4/21/2015 11:01 AM, Jay Smith wrote:
> >> >>
> >> >> Before I sent the last message I had signed up to become a user.
> >> >> My previous message was bounced.  WHY
> >> >
> >> >
> >> > I, for one, have received both your original and this new message.
> >> > --
> >> > Igor Tandetnik
> >> >
> >> >
> >> > ___
> >> > sqlite-users mailing list
> >> > sqlite-users at mailinglists.sqlite.org
> >> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >>
> >>
> >>
> >> --
> >> --
> >> VerifEye Technologies Inc.
> >> 151 Whitehall Dr. Unit 2
> >> Markham, ON
> >> L3R 9T1
> >> ___
> >> sqlite-users mailing list
> >> sqlite-users at mailinglists.sqlite.org
> >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >>
> > ___
> > sqlite-users mailing list
> > sqlite-users at mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
> --
> --
> VerifEye Technologies Inc.
> 151 Whitehall Dr. Unit 2
> Markham, ON
> L3R 9T1
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] building SQLite DLL with Visual C++

2015-04-23 Thread Jay Smith
Thanks Igor
the only response I got to the first message was "it has been bounced"


On Wed, Apr 22, 2015 at 9:51 AM, Igor Tandetnik  wrote:

> On 4/21/2015 11:01 AM, Jay Smith wrote:
>
>> Before I sent the last message I had signed up to become a user.
>> My previous message was bounced.  WHY
>>
>
> I, for one, have received both your original and this new message.
> --
> Igor Tandetnik
>
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] building SQLite DLL with Visual C++

2015-04-23 Thread Jay Smith
Thank you Adam for responding to my post. I have the windows binaries
downloaded.

At this point I am just following the instructions in the book. And I
really am not sure what I need the dll for.

Here's the scenario. I have created a program in vb2012. The program stores
less than 20 fields of data. I am currently saving the data in a html
format. I just recently discovered SQLite. I am now in the process of
changing over to a database to store data. I studied SQL and Oracle 10
years ago. I have almost completed the database for the project.  My
problem is how to integrate the SQL db into my VB program.

On Wed, Apr 22, 2015 at 10:16 AM, Adam Devita  wrote:

> Good day,
>
>
> Why are you compiling a dll instead of using the pre-compiled windows
> binaries at http://www.sqlite.org/download.html?
>
> Are you adding some sort of extra wrapper?
>
> Why are you not adding the amalgamated c source in your project (turn
> off use pre-compiled headers for that file) ?
>
> If you insist on creating your own dll, try the vs wizard to create a
> dll project, then add code to it.
>
> regards,
> Adam DeVita
>
>
> On Wed, Apr 22, 2015 at 9:51 AM, Igor Tandetnik 
> wrote:
> > On 4/21/2015 11:01 AM, Jay Smith wrote:
> >>
> >> Before I sent the last message I had signed up to become a user.
> >> My previous message was bounced.  WHY
> >
> >
> > I, for one, have received both your original and this new message.
> > --
> > Igor Tandetnik
> >
> >
> > ___
> > sqlite-users mailing list
> > sqlite-users at mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
> --
> --
> VerifEye Technologies Inc.
> 151 Whitehall Dr. Unit 2
> Markham, ON
> L3R 9T1
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] building SQLite DLL with Visual C++

2015-04-21 Thread Jay Smith
Dear sir
Before I sent the last message I had signed up to become a user.
My previous message was bounced.  WHY
copy of previous message:

I am new to SQLite. I have a book I am learning from and I am a novice.

I have a fairly good handle on SQL

I want to include SQLite in my VS2012 program.

I am attempting to run " LIB  /DEF:sqlite3.def "

I get error This error "LIB is not recognized as an internal or external
command."

What am I doing wrong?

On Mon, Apr 20, 2015 at 10:21 AM, Jay Smith  wrote:

> I am new to SQLite. I have a book I am learning from and I am a novice.
>
> I have a fairly good handle on SQL
>
> I want to include SQLite in my VS2012 program.
>
> I am attempting to run " LIB  /DEF:sqlite3.def "
>
> I get error This error "LIB is not recognized as an internal or external
> command."
>
> What am I doing wrong?
>
> Jay
>


[sqlite] building SQLite DLL with Visual C++

2015-04-20 Thread Jay Smith
I am new to SQLite. I have a book I am learning from and I am a novice.

I have a fairly good handle on SQL

I want to include SQLite in my VS2012 program.

I am attempting to run " LIB  /DEF:sqlite3.def "

I get error This error "LIB is not recognized as an internal or external
command."

What am I doing wrong?

Jay