Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Jonas Malaco Filho
Just curious, what dev language are you using?

*Jonas Malaco Filho*

On 25/05/2012, at 17:57, Peter Haworth  wrote:

Just picking a random post to make my reply to.

I truly wish I could get access to an external sqlite library to load at
runtime.  I use e devlopement language that has the sqlite library built
into it so I am at the mercy of the language provider as to what is
provided.  Right now, they are using sqlite 3.7.4 which looks to be at
least 7 releases out of date and lacks several features including fts4aux
and rtree virtual tables.  TO make matters worse, they don;t expose
whatever function it is in sqlite that would allow me to load extensions to
sqlite from external libraries.

So while I think that in most circumstances it makes sense to compile the
sqlite library into your application for all the reasons mentioned, I wish
that was not the case in my circumstances.

Pete
lcSQL Software 



On Fri, May 25, 2012 at 9:00 AM,  wrote:

Message: 60

Date: Fri, 25 May 2012 12:45:07 +

From: "Black, Michael (IS)" 

To: General Discussion of SQLite Database 

Subject: Re: [sqlite] What does "The use of the amalgamation is

  recommended for all applications." mean, precisely?

Message-ID: 

Content-Type: text/plain; charset="iso-8859-1"


On the 3rd hand (Medusa here) those of us involved in mission critical

apps refuse to let people arbitrarily update packages that are part of the

"system".  Things like the bug introduced in 3.7.12 being a prime example.




It's called "Configuration Control".  Some apps may depend on updated

system libraries...just keep them out of my sandbox.  If our app needs a

fix WE put it in under a controlled manner with regression testing, test

system, and final deployment.  And we may include a newer version than the

system is allowed to have.




Call me (and my configuration control panel) control freaks.




We used to have tons of problems on Solaris due to shared libraries.

Numerous incompatibilities across multiple versions of Solaris.  Static

link always worked.






Michael D. Black


Senior Scientist


Advanced Analytics Directorate


Advanced GEOINT Solutions Operating Unit


Northrop Grumman Information Systems


___
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] Duplicated Values - Occurrence Count

2012-05-25 Thread Darren Duncan

Nigel Verity wrote:

Hi
I'd be grateful for a little advice on SQL syntax, as supported by sqlite.
I have a table containing, typically, around 50,000 records. Within the table one 
particular field will contain many occurrences of the same string value. I can produce a 
de-duplicated list of the values from that field using "SELECT DISTINCT", but 
it would be useful to have an occurrence count against each value so that, for example, 
the list
aabbbc
would produce the output
aaa, 2bbb, 1ccc, 3
I know there are ways of achieving this by joining multiple views but, for my 
own education, I'd like to know if there is an elegant way of achieving this in 
a single query.
Thanks
Nige


You say something like this:

  select myfield, count(*) as mycnt from mytbl group by myfield

... where myfield is the one containing the duplicates.

-- Darren Duncan
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Duplicated Values - Occurrence Count

2012-05-25 Thread Nigel Verity

Hi
I'd be grateful for a little advice on SQL syntax, as supported by sqlite.
I have a table containing, typically, around 50,000 records. Within the table 
one particular field will contain many occurrences of the same string value. I 
can produce a de-duplicated list of the values from that field using "SELECT 
DISTINCT", but it would be useful to have an occurrence count against each 
value so that, for example, the list
aabbbc
would produce the output
aaa, 2bbb, 1ccc, 3
I know there are ways of achieving this by joining multiple views but, for my 
own education, I'd like to know if there is an elegant way of achieving this in 
a single query.
Thanks
Nige

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


Re: [sqlite] Bug: SQLiteDataAdapter.FillSchema doesn't work with multiresult queries

2012-05-25 Thread Joe Mistachkin

Thanks for the report.  This issue is being worked on here:

https://system.data.sqlite.org/index.html/info/3aa50d8413 

--
Joe Mistachkin

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


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Peter Haworth
Just picking a random post to make my reply to.

I truly wish I could get access to an external sqlite library to load at
runtime.  I use e devlopement language that has the sqlite library built
into it so I am at the mercy of the language provider as to what is
provided.  Right now, they are using sqlite 3.7.4 which looks to be at
least 7 releases out of date and lacks several features including fts4aux
and rtree virtual tables.  TO make matters worse, they don;t expose
whatever function it is in sqlite that would allow me to load extensions to
sqlite from external libraries.

So while I think that in most circumstances it makes sense to compile the
sqlite library into your application for all the reasons mentioned, I wish
that was not the case in my circumstances.

Pete
lcSQL Software 



On Fri, May 25, 2012 at 9:00 AM,  wrote:

> Message: 60
> Date: Fri, 25 May 2012 12:45:07 +
> From: "Black, Michael (IS)" 
> To: General Discussion of SQLite Database 
> Subject: Re: [sqlite] What does "The use of the amalgamation is
>recommended for all applications." mean, precisely?
> Message-ID: 
> Content-Type: text/plain; charset="iso-8859-1"
>
> On the 3rd hand (Medusa here) those of us involved in mission critical
> apps refuse to let people arbitrarily update packages that are part of the
> "system".  Things like the bug introduced in 3.7.12 being a prime example.
>
>
>
> It's called "Configuration Control".  Some apps may depend on updated
> system libraries...just keep them out of my sandbox.  If our app needs a
> fix WE put it in under a controlled manner with regression testing, test
> system, and final deployment.  And we may include a newer version than the
> system is allowed to have.
>
>
>
> Call me (and my configuration control panel) control freaks.
>
>
>
> We used to have tons of problems on Solaris due to shared libraries.
>  Numerous incompatibilities across multiple versions of Solaris.  Static
> link always worked.
>
>
>
>
>
> Michael D. Black
>
> Senior Scientist
>
> Advanced Analytics Directorate
>
> Advanced GEOINT Solutions Operating Unit
>
> Northrop Grumman Information Systems
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Fossil code sprint. Was: DRH to be in Munich, Germany July 3rd, 2012

2012-05-25 Thread Stephan Beal
For those who missed the notice about Richard's visit the first time around:

https://plus.google.com/104981852298046595282/posts/JhpKW3zXScj


On Fri, May 25, 2012 at 9:45 PM, Richard Hipp  wrote:

> * User preferences stored in a cookie
>

Adding persistent user preferences on top of Fossil's JSON API would be (A)
really easy and (B) allow the preferences to be of near-arbitrary
complexity. e.g. it could be used to periodically store drafts of a wysiwyg
editing session (in addition to any user-specific repo-level config
options). Alternately/additionally, "session" support (storage valid as
long as the login token) would be really easy to add.


> The above list will likely grow.  So if you are planning to be in the
> Munich area on July 3 please stop by   Contact Stephen Beal for information
> on the venue.
>


Those who "register" with me will get details on when/where, once those are
finalized (the Where is decided, the exact When not so much).


> If this code sprint works out - if people show interest and useful work
> gets done - then I'll be happy to have follow-ups in other locations and on
> other continents.
>

But those visiting this first time around will always be able to say, "we
saw him before he was famous!" ;)


Happy Hacking!

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Fossil code sprint. Was: DRH to be in Munich, Germany July 3rd, 2012

2012-05-25 Thread Richard Hipp
On Tue, May 15, 2012 at 12:20 PM, Stephan Beal wrote:

>
> Richard Hipp will be in Munich, Germany for a few days in July and has
> graciously[1] offered to host a presentation and/or hacking session with
> regards to sqlite and/or Fossil SCM.
>

My desire is to have a Fossil code-sprint on July 3.  Come and bring your
laptop and be prepared to hack.  I'll have contributor license
agreementson
hand for you to sign if you have not done so already, I will be
handing
out passwords for push privileges on the core Fossil repository, and I will
providing guidance and training to anybody who is interested in how to get
started in hacking Fossil.

Ideas for things to implement at the sprint include:

* WYSIWYG wiki editing
* Web-based content file editing
* User preferences stored in a cookie
* Automatically adjust side-by-side font sizes to fit the screen
* Full text search
* Better labeling of attachments
* Fix the private branch mechanism to make it easy to publish a private
branch
* Automated self-test

The above list will likely grow.  So if you are planning to be in the
Munich area on July 3 please stop by   Contact Stephen Beal for information
on the venue.

If this code sprint works out - if people show interest and useful work
gets done - then I'll be happy to have follow-ups in other locations and on
other continents.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] (no subject)

2012-05-25 Thread Kees Nuyt
On Fri, 25 May 2012 14:56:24 -0400, Frank Chang
 wrote:

>
> http://swatim dot sw dot ohost dot de/gertycamp3.html

Poisonous link, don't click.

Frank, please perform a rigorous virus check on your machine(s), you may
have been infected by a bot.


-- 
Regards,

Kees Nuyt

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


[sqlite] Bug: SQLiteDataAdapter.FillSchema doesn't work with multiresult queries

2012-05-25 Thread z Kemtauros

How to reproduce: obtain any SQLite database with 2 or more tables in it (I 
used "CREATE TABLE a (x INTEGER PRIMARY KEY); CREATE TABLE b (y INTEGER PRIMARY 
KEY)"). Compile and run the following C# code:

SQLiteConnectionStringBuilder connBuilder = new SQLiteConnectionStringBuilder();
connBuilder.DataSource = ;
SQLiteConnection conn = new SQLiteConnection(connBuilder.ConnectionString);
 DataSet dataSet = new DataSet();
SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter(@"SELECT * FROM a; SELECT 
* FROM b;", conn);
 dataAdapter.FillSchema(dataSet, SchemaType.Source);

The last line mysteriously throws NullReferenceException — apparently, 
something went wrong deep inside System.SQLite.Data assembly, but I don't have 
its source code at the hands.

I would appreciate if someone pointed me at a _nice_ workaround other than 
"Don't use FillSchema()".
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Improving performance of GROUP BY

2012-05-25 Thread Simon Slavin

On 25 May 2012, at 7:38pm, Udi Karni  wrote:

> I am running the following query -
> 
> CREATE TABLE XYZ AS
> SELECT ID, MIN (DATE)
> FROM SOURCE-TABLE
> WHERE CRITERIA
> GROUP BY ID ;
> 
> SOURCE-TABLE has 600 million rows, 2 million meet the WHERE criteria, and
> get grouped to 100,000 distinct IDs. There are no indexes as there is too
> much variety in the WHERE clauses and index creation on this table takes
> many hours. Temp_store=memory. When executed - the source table is read
> very slowly, and runtime is 1/2 hour.
> 
> I split this SQL into 2 steps - the first just extracting - the second just
> grouping. The extract read the table extremely fast and finished in 3
> minutes. The GROUP BY ran in a few seconds. So a 10X improvement - which is
> pretty incredible speed.

Just for testing purposes, change MIN(DATE) to DATE and check the timings.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Improving performance of GROUP BY

2012-05-25 Thread Udi Karni
I am running the following query -

CREATE TABLE XYZ AS
SELECT ID, MIN (DATE)
FROM SOURCE-TABLE
WHERE CRITERIA
GROUP BY ID ;

SOURCE-TABLE has 600 million rows, 2 million meet the WHERE criteria, and
get grouped to 100,000 distinct IDs. There are no indexes as there is too
much variety in the WHERE clauses and index creation on this table takes
many hours. Temp_store=memory. When executed - the source table is read
very slowly, and runtime is 1/2 hour.

I split this SQL into 2 steps - the first just extracting - the second just
grouping. The extract read the table extremely fast and finished in 3
minutes. The GROUP BY ran in a few seconds. So a 10X improvement - which is
pretty incredible speed.

Why such a large disparity? Why wouldn't the single-step SQL read fast -
write the accepted values to TEMP - then sort and group - same as the
2-step?

Any way to influence the SQlite SQL processor to chose a more optimal
single-step approach?

Thanks !
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FW: Problem with SQLite when deployed.

2012-05-25 Thread Random Coder
On Fri, May 25, 2012 at 9:40 AM, Pavel Ivanov  wrote:
> Except that 64-bit executable cannot load 32-bit DLL and vice versa.
> I'm not sure how this rule is applied to managed executables and DLLs
> loading unmanaged DLLs.

On a 64-bit machine managed executables run as 64-bit assemblies (and
thus can only load 64-bit DLLs) unless the 32-bit flag is set in the
assembly.  You can set this flag via Visual Studio's "Platform Target"
option or CorFlags.exe.  I also seem to recall if a 32-bit assembly
launches a managed assembly, it'll be run as a 32-bit process.

This is why I use a custom SQLite DLL.  I compile and ship both 32 bit
and 64 bit versions and load the proper DLL at runtime depending on
how my process has been run.  Sadly, my solution has too many other
custom features to be something I can publish.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FW: Problem with SQLite when deployed.

2012-05-25 Thread Pavel Ivanov
> For device drivers, the 32 & 64 bit difference can be incompatible. For
> other libraries, DLL functions are just like exe ones.  The 64 bit machine
> should execute the 32 bit code.

Except that 64-bit executable cannot load 32-bit DLL and vice versa.
I'm not sure how this rule is applied to managed executables and DLLs
loading unmanaged DLLs.


Pavel


On Fri, May 25, 2012 at 12:14 PM, Adam DeVita  wrote:
> Under normal circumstances, same directory as the exe is part of a default
> path of places Windows looks.
>
> I just ran my 32 bit code on a windows 7 64 bit machine. It worked ok  ( It
> is just a count records in this table and display it on a test label. ).
>
> For device drivers, the 32 & 64 bit difference can be incompatible. For
> other libraries, DLL functions are just like exe ones.  The 64 bit machine
> should execute the 32 bit code.
>
> I'm testing with the .NET 3.5  SP1 32 bit code.
>
> Adam
>
>
>
> On Fri, May 25, 2012 at 11:47 AM, Peter Walburn <
> peter.walb...@omega-data.com> wrote:
>
>> I've just been trying some other things and it seems that the
>> SQLite.Interop.dll file that I have copied to the 32-bit operating system
>> is the 64-bit version.  I think it will work if I make sure that the 32-bit
>> versions of the DLLs are included in my install program.  Will the 32-bit
>> versions work on 64-bit operating systems too?
>>
>>
>>
>> Peter Walburn
>> Software Engineer
>> E-mail: peter.walb...@omega-data.com
>> Units 44-46 Howe Moss Avenue, Kirkhill Industrial Estate,
>> Dyce, Aberdeen AB21 0GP
>> Tel: +44 (0)1224 772763
>> Fax: +44 (0)1224 772783
>> www.omega-data.com
>>
>>
>>
>>
>> -Original Message-
>> From: sqlite-users-boun...@sqlite.org [mailto:
>> sqlite-users-boun...@sqlite.org] On Behalf Of Adam DeVita
>> Sent: 25 May 2012 16:37
>> To: General Discussion of SQLite Database
>> Subject: Re: [sqlite] FW: Problem with SQLite when deployed.
>>
>> Simple thing first:
>>
>> Did you ensure that the SQLite.Interop.dll is in the path that the PC is
>> searching?
>>
>> regards,
>> Adam
>>
>>
>> On Fri, May 25, 2012 at 10:57 AM, Peter Walburn <
>> peter.walb...@omega-data.com> wrote:
>>
>> > Hi,
>> >
>> > I have an application written in C# .Net 4.0 Framework.  I use SQLite
>> > within the application.  I have recently updated from an older version
>> > of SQLite to the latest version as I have moved to .Net Framework 4.0
>> > and I received error messages about Mixed Mode Frameworks.
>> >
>> > Anyway, I do the development on an 64-Bit Windows 7 operating system.
>> > I use Installshield 2010 Express to create an installation for the
>> > application.  The application works ok on the Windows 7 PC, but when
>> > installed on a different PC (or on a Virtual Client PC using VMWare),
>> > I always receive a message such as:
>> >
>> > Unhandled exception has occurred in your application.  If you click
>> > Continue, the application will ignore this error and attempt to
>> > continue. If you click Quit, the application will close immediately.
>> >
>> > Unable to load DLL 'SQLite.Interop.dll': The specified module could
>> > not be found. (Exception from HRESULT: 0x8007007e).
>> >
>> > I have tried to post this email about 5 times and it is always
>> > returned
>> > saying: "The message's content type was not explicitly allowed."
>> >
>> >
>> >
>> > Peter Walburn
>> > Software Engineer
>> > E-mail: peter.walb...@omega-data.com
>> > Units 44-46 Howe Moss Avenue, Kirkhill Industrial Estate, Dyce,
>> > Aberdeen
>> > AB21 0GP
>> > Tel: +44 (0)1224 772763
>> > Fax: +44 (0)1224 772783
>> > www.omega-data.com
>> >
>> >
>> >
>> >
>> >
>> > This is an email from Omega Data Services Ltd, a company registered in
>> > Edinburgh, Scotland, with company number SC192323. Registered Office:
>> > Maclay Murray & Spens, 66 Queens Road, Aberdeen, AB15 4YE. Tel:
>> > 01224-356130. Website: www.omega-data.com .
>> > This email and any files transmitted are confidential and intended
>> > solely for the individual or entity to whom they are addressed. Any
>> > views or opinions expressed or presented are those of the author(s)
>> > and may not necessarily represent those of the company and no
>> > representation is given nor liability accepted for the accuracy or
>> > completeness of any information contained in this email unless
>> > expressly stated to the contrary. If you are not the intended
>> > recipient or have received this email in error, you may not use,
>> > disseminate, forward, print or copy it, but please notify the sender
>> > that you have received it in error and remove the message from your
>> system immediately.
>> > Whilst we have taken reasonable precautions to ensure that this email
>> > and any attachments have been checked for viruses, we cannot guarantee
>> > that they are virus free, and we cannot accept liability for any
>> > damage sustained as a result of software viruses. We would advise that
>> > you carry out your own 

Re: [sqlite] FW: Problem with SQLite when deployed.

2012-05-25 Thread Adam DeVita
Under normal circumstances, same directory as the exe is part of a default
path of places Windows looks.

I just ran my 32 bit code on a windows 7 64 bit machine. It worked ok  ( It
is just a count records in this table and display it on a test label. ).

For device drivers, the 32 & 64 bit difference can be incompatible. For
other libraries, DLL functions are just like exe ones.  The 64 bit machine
should execute the 32 bit code.

I'm testing with the .NET 3.5  SP1 32 bit code.

Adam



On Fri, May 25, 2012 at 11:47 AM, Peter Walburn <
peter.walb...@omega-data.com> wrote:

> I've just been trying some other things and it seems that the
> SQLite.Interop.dll file that I have copied to the 32-bit operating system
> is the 64-bit version.  I think it will work if I make sure that the 32-bit
> versions of the DLLs are included in my install program.  Will the 32-bit
> versions work on 64-bit operating systems too?
>
>
>
> Peter Walburn
> Software Engineer
> E-mail: peter.walb...@omega-data.com
> Units 44-46 Howe Moss Avenue, Kirkhill Industrial Estate,
> Dyce, Aberdeen AB21 0GP
> Tel: +44 (0)1224 772763
> Fax: +44 (0)1224 772783
> www.omega-data.com
>
>
>
>
> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:
> sqlite-users-boun...@sqlite.org] On Behalf Of Adam DeVita
> Sent: 25 May 2012 16:37
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] FW: Problem with SQLite when deployed.
>
> Simple thing first:
>
> Did you ensure that the SQLite.Interop.dll is in the path that the PC is
> searching?
>
> regards,
> Adam
>
>
> On Fri, May 25, 2012 at 10:57 AM, Peter Walburn <
> peter.walb...@omega-data.com> wrote:
>
> > Hi,
> >
> > I have an application written in C# .Net 4.0 Framework.  I use SQLite
> > within the application.  I have recently updated from an older version
> > of SQLite to the latest version as I have moved to .Net Framework 4.0
> > and I received error messages about Mixed Mode Frameworks.
> >
> > Anyway, I do the development on an 64-Bit Windows 7 operating system.
> > I use Installshield 2010 Express to create an installation for the
> > application.  The application works ok on the Windows 7 PC, but when
> > installed on a different PC (or on a Virtual Client PC using VMWare),
> > I always receive a message such as:
> >
> > Unhandled exception has occurred in your application.  If you click
> > Continue, the application will ignore this error and attempt to
> > continue. If you click Quit, the application will close immediately.
> >
> > Unable to load DLL 'SQLite.Interop.dll': The specified module could
> > not be found. (Exception from HRESULT: 0x8007007e).
> >
> > I have tried to post this email about 5 times and it is always
> > returned
> > saying: "The message's content type was not explicitly allowed."
> >
> >
> >
> > Peter Walburn
> > Software Engineer
> > E-mail: peter.walb...@omega-data.com
> > Units 44-46 Howe Moss Avenue, Kirkhill Industrial Estate, Dyce,
> > Aberdeen
> > AB21 0GP
> > Tel: +44 (0)1224 772763
> > Fax: +44 (0)1224 772783
> > www.omega-data.com
> >
> >
> >
> >
> >
> > This is an email from Omega Data Services Ltd, a company registered in
> > Edinburgh, Scotland, with company number SC192323. Registered Office:
> > Maclay Murray & Spens, 66 Queens Road, Aberdeen, AB15 4YE. Tel:
> > 01224-356130. Website: www.omega-data.com .
> > This email and any files transmitted are confidential and intended
> > solely for the individual or entity to whom they are addressed. Any
> > views or opinions expressed or presented are those of the author(s)
> > and may not necessarily represent those of the company and no
> > representation is given nor liability accepted for the accuracy or
> > completeness of any information contained in this email unless
> > expressly stated to the contrary. If you are not the intended
> > recipient or have received this email in error, you may not use,
> > disseminate, forward, print or copy it, but please notify the sender
> > that you have received it in error and remove the message from your
> system immediately.
> > Whilst we have taken reasonable precautions to ensure that this email
> > and any attachments have been checked for viruses, we cannot guarantee
> > that they are virus free, and we cannot accept liability for any
> > damage sustained as a result of software viruses. We would advise that
> > you carry out your own virus checks, especially before opening an
> > attachment.
> >
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
>
>
>
> --
> VerifEye Technologies Inc.
> 905-948-0015x245
> 151 Whitehall Dr, Unit 2
> Markham ON, L3R 9T1
> Canada
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
> --
> This message has been scanned for 

[sqlite] Static linking. Was: Problem with SQLite when deployed.

2012-05-25 Thread Richard Hipp
We were just having a discussion on a different thread on the relative
merits of static versus dynamic linking.

Notice that if the application where statically linked (if that were
possible in C#) then all the grief that Peter is having would have never
come up.  The application would just work, and everybody would be happy.

On Fri, May 25, 2012 at 10:56 AM, Peter Walburn <
peter.walb...@omega-data.com> wrote:

> Hi,
>
> I have an application written in C# .Net 4.0 Framework.  I use SQLite
> within the application.  I have recently updated from an older version of
> SQLite to the latest version as I have moved to .Net Framework 4.0 and I
> received error messages about Mixed Mode Frameworks.
>
> Anyway, I do the development on an 64-Bit Windows 7 operating system.  I
> use Installshield 2010 Express to create an installation for the
> application.  The application works ok on the Windows 7 PC, but when
> installed on a different PC (or on a Virtual Client PC using VMWare), I
> always receive a message such as:
>
> Unhandled exception has occurred in your application.  If you click
> Continue, the application will ignore this error and attempt to continue.
> If you click Quit, the application will close immediately.
>
> Unable to load DLL 'SQLite.Interop.dll': The specified module could not be
> found. (Exception from HRESULT: 0x8007007e).
>
> I have tried to post this email about 5 times and it is always returned
> saying: "The message's content type was not explicitly allowed."
>
>
>
> Peter Walburn
> Software Engineer
> E-mail: peter.walb...@omega-data.com
> Units 44-46 Howe Moss Avenue, Kirkhill Industrial Estate,
> Dyce, Aberdeen AB21 0GP
> Tel: +44 (0)1224 772763
> Fax: +44 (0)1224 772783
> www.omega-data.com
>
>
>
>
>
> This is an email from Omega Data Services Ltd, a company registered in
> Edinburgh, Scotland, with company number SC192323. Registered Office:
> Maclay Murray & Spens, 66 Queens Road, Aberdeen, AB15 4YE. Tel:
> 01224-356130. Website: www.omega-data.com .
> This email and any files transmitted are confidential and intended solely
> for the individual or entity to whom they are addressed. Any views or
> opinions expressed or presented are those of the author(s) and may not
> necessarily represent those of the company and no representation is given
> nor liability accepted for the accuracy or completeness of any information
> contained in this email unless expressly stated to the contrary. If you are
> not the intended recipient or have received this email in error, you may
> not use, disseminate, forward, print or copy it, but please notify the
> sender that you have received it in error and remove the message from your
> system immediately.
> Whilst we have taken reasonable precautions to ensure that this email and
> any attachments have been checked for viruses, we cannot guarantee that
> they are virus free, and we cannot accept liability for any damage
> sustained as a result of software viruses. We would advise that you carry
> out your own virus checks, especially before opening an attachment.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FW: Problem with SQLite when deployed.

2012-05-25 Thread Peter Walburn
I've just been trying some other things and it seems that the 
SQLite.Interop.dll file that I have copied to the 32-bit operating system is 
the 64-bit version.  I think it will work if I make sure that the 32-bit 
versions of the DLLs are included in my install program.  Will the 32-bit 
versions work on 64-bit operating systems too?



Peter Walburn
Software Engineer
E-mail: peter.walb...@omega-data.com 
Units 44-46 Howe Moss Avenue, Kirkhill Industrial Estate, 
Dyce, Aberdeen AB21 0GP
Tel: +44 (0)1224 772763
Fax: +44 (0)1224 772783
www.omega-data.com




-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Adam DeVita
Sent: 25 May 2012 16:37
To: General Discussion of SQLite Database
Subject: Re: [sqlite] FW: Problem with SQLite when deployed.

Simple thing first:

Did you ensure that the SQLite.Interop.dll is in the path that the PC is 
searching?

regards,
Adam


On Fri, May 25, 2012 at 10:57 AM, Peter Walburn < peter.walb...@omega-data.com> 
wrote:

> Hi,
>
> I have an application written in C# .Net 4.0 Framework.  I use SQLite 
> within the application.  I have recently updated from an older version 
> of SQLite to the latest version as I have moved to .Net Framework 4.0 
> and I received error messages about Mixed Mode Frameworks.
>
> Anyway, I do the development on an 64-Bit Windows 7 operating system.  
> I use Installshield 2010 Express to create an installation for the 
> application.  The application works ok on the Windows 7 PC, but when 
> installed on a different PC (or on a Virtual Client PC using VMWare), 
> I always receive a message such as:
>
> Unhandled exception has occurred in your application.  If you click 
> Continue, the application will ignore this error and attempt to 
> continue. If you click Quit, the application will close immediately.
>
> Unable to load DLL 'SQLite.Interop.dll': The specified module could 
> not be found. (Exception from HRESULT: 0x8007007e).
>
> I have tried to post this email about 5 times and it is always 
> returned
> saying: "The message's content type was not explicitly allowed."
>
>
>
> Peter Walburn
> Software Engineer
> E-mail: peter.walb...@omega-data.com
> Units 44-46 Howe Moss Avenue, Kirkhill Industrial Estate, Dyce, 
> Aberdeen
> AB21 0GP
> Tel: +44 (0)1224 772763
> Fax: +44 (0)1224 772783
> www.omega-data.com
>
>
>
>
>
> This is an email from Omega Data Services Ltd, a company registered in 
> Edinburgh, Scotland, with company number SC192323. Registered Office:
> Maclay Murray & Spens, 66 Queens Road, Aberdeen, AB15 4YE. Tel:
> 01224-356130. Website: www.omega-data.com .
> This email and any files transmitted are confidential and intended 
> solely for the individual or entity to whom they are addressed. Any 
> views or opinions expressed or presented are those of the author(s) 
> and may not necessarily represent those of the company and no 
> representation is given nor liability accepted for the accuracy or 
> completeness of any information contained in this email unless 
> expressly stated to the contrary. If you are not the intended 
> recipient or have received this email in error, you may not use, 
> disseminate, forward, print or copy it, but please notify the sender 
> that you have received it in error and remove the message from your system 
> immediately.
> Whilst we have taken reasonable precautions to ensure that this email 
> and any attachments have been checked for viruses, we cannot guarantee 
> that they are virus free, and we cannot accept liability for any 
> damage sustained as a result of software viruses. We would advise that 
> you carry out your own virus checks, especially before opening an 
> attachment.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



--
VerifEye Technologies Inc.
905-948-0015x245
151 Whitehall Dr, Unit 2
Markham ON, L3R 9T1
Canada
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

--
This message has been scanned for viruses and dangerous content by Converged, 
and is believed to be clean.

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


Re: [sqlite] FW: Problem with SQLite when deployed.

2012-05-25 Thread Peter Walburn
Adam

SQLite.Interop.dll is in the same directory as the application being run.  But 
it probably isn't in the PC's search path.



Peter Walburn
Software Engineer
E-mail: peter.walb...@omega-data.com 
Units 44-46 Howe Moss Avenue, Kirkhill Industrial Estate, 
Dyce, Aberdeen AB21 0GP
Tel: +44 (0)1224 772763
Fax: +44 (0)1224 772783
www.omega-data.com




-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Adam DeVita
Sent: 25 May 2012 16:37
To: General Discussion of SQLite Database
Subject: Re: [sqlite] FW: Problem with SQLite when deployed.

Simple thing first:

Did you ensure that the SQLite.Interop.dll is in the path that the PC is 
searching?

regards,
Adam


On Fri, May 25, 2012 at 10:57 AM, Peter Walburn < peter.walb...@omega-data.com> 
wrote:

> Hi,
>
> I have an application written in C# .Net 4.0 Framework.  I use SQLite 
> within the application.  I have recently updated from an older version 
> of SQLite to the latest version as I have moved to .Net Framework 4.0 
> and I received error messages about Mixed Mode Frameworks.
>
> Anyway, I do the development on an 64-Bit Windows 7 operating system.  
> I use Installshield 2010 Express to create an installation for the 
> application.  The application works ok on the Windows 7 PC, but when 
> installed on a different PC (or on a Virtual Client PC using VMWare), 
> I always receive a message such as:
>
> Unhandled exception has occurred in your application.  If you click 
> Continue, the application will ignore this error and attempt to 
> continue. If you click Quit, the application will close immediately.
>
> Unable to load DLL 'SQLite.Interop.dll': The specified module could 
> not be found. (Exception from HRESULT: 0x8007007e).
>
> I have tried to post this email about 5 times and it is always 
> returned
> saying: "The message's content type was not explicitly allowed."
>
>
>
> Peter Walburn
> Software Engineer
> E-mail: peter.walb...@omega-data.com
> Units 44-46 Howe Moss Avenue, Kirkhill Industrial Estate, Dyce, 
> Aberdeen
> AB21 0GP
> Tel: +44 (0)1224 772763
> Fax: +44 (0)1224 772783
> www.omega-data.com
>
>
>
>
>
> This is an email from Omega Data Services Ltd, a company registered in 
> Edinburgh, Scotland, with company number SC192323. Registered Office:
> Maclay Murray & Spens, 66 Queens Road, Aberdeen, AB15 4YE. Tel:
> 01224-356130. Website: www.omega-data.com .
> This email and any files transmitted are confidential and intended 
> solely for the individual or entity to whom they are addressed. Any 
> views or opinions expressed or presented are those of the author(s) 
> and may not necessarily represent those of the company and no 
> representation is given nor liability accepted for the accuracy or 
> completeness of any information contained in this email unless 
> expressly stated to the contrary. If you are not the intended 
> recipient or have received this email in error, you may not use, 
> disseminate, forward, print or copy it, but please notify the sender 
> that you have received it in error and remove the message from your system 
> immediately.
> Whilst we have taken reasonable precautions to ensure that this email 
> and any attachments have been checked for viruses, we cannot guarantee 
> that they are virus free, and we cannot accept liability for any 
> damage sustained as a result of software viruses. We would advise that 
> you carry out your own virus checks, especially before opening an 
> attachment.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



--
VerifEye Technologies Inc.
905-948-0015x245
151 Whitehall Dr, Unit 2
Markham ON, L3R 9T1
Canada
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

--
This message has been scanned for viruses and dangerous content by Converged, 
and is believed to be clean.

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


Re: [sqlite] FW: Problem with SQLite when deployed.

2012-05-25 Thread Adam DeVita
Simple thing first:

Did you ensure that the SQLite.Interop.dll is in the path that the PC is
searching?

regards,
Adam


On Fri, May 25, 2012 at 10:57 AM, Peter Walburn <
peter.walb...@omega-data.com> wrote:

> Hi,
>
> I have an application written in C# .Net 4.0 Framework.  I use SQLite
> within the application.  I have recently updated from an older version
> of SQLite to the latest version as I have moved to .Net Framework 4.0
> and I received error messages about Mixed Mode Frameworks.
>
> Anyway, I do the development on an 64-Bit Windows 7 operating system.  I
> use Installshield 2010 Express to create an installation for the
> application.  The application works ok on the Windows 7 PC, but when
> installed on a different PC (or on a Virtual Client PC using VMWare), I
> always receive a message such as:
>
> Unhandled exception has occurred in your application.  If you click
> Continue, the application will ignore this error and attempt to
> continue. If you click Quit, the application will close immediately.
>
> Unable to load DLL 'SQLite.Interop.dll': The specified module could not
> be found. (Exception from HRESULT: 0x8007007e).
>
> I have tried to post this email about 5 times and it is always returned
> saying: "The message's content type was not explicitly allowed."
>
>
>
> Peter Walburn
> Software Engineer
> E-mail: peter.walb...@omega-data.com
> Units 44-46 Howe Moss Avenue, Kirkhill Industrial Estate, Dyce, Aberdeen
> AB21 0GP
> Tel: +44 (0)1224 772763
> Fax: +44 (0)1224 772783
> www.omega-data.com
>
>
>
>
>
> This is an email from Omega Data Services Ltd, a company registered in
> Edinburgh, Scotland, with company number SC192323. Registered Office:
> Maclay Murray & Spens, 66 Queens Road, Aberdeen, AB15 4YE. Tel:
> 01224-356130. Website: www.omega-data.com .
> This email and any files transmitted are confidential and intended
> solely for the individual or entity to whom they are addressed. Any
> views or opinions expressed or presented are those of the author(s) and
> may not necessarily represent those of the company and no representation
> is given nor liability accepted for the accuracy or completeness of any
> information contained in this email unless expressly stated to the
> contrary. If you are not the intended recipient or have received this
> email in error, you may not use, disseminate, forward, print or copy it,
> but please notify the sender that you have received it in error and
> remove the message from your system immediately.
> Whilst we have taken reasonable precautions to ensure that this email
> and any attachments have been checked for viruses, we cannot guarantee
> that they are virus free, and we cannot accept liability for any damage
> sustained as a result of software viruses. We would advise that you
> carry out your own virus checks, especially before opening an
> attachment.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
VerifEye Technologies Inc.
905-948-0015x245
151 Whitehall Dr, Unit 2
Markham ON, L3R 9T1
Canada
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] FW: Problem with SQLite when deployed.

2012-05-25 Thread Peter Walburn
Hi,

I have an application written in C# .Net 4.0 Framework.  I use SQLite
within the application.  I have recently updated from an older version
of SQLite to the latest version as I have moved to .Net Framework 4.0
and I received error messages about Mixed Mode Frameworks.

Anyway, I do the development on an 64-Bit Windows 7 operating system.  I
use Installshield 2010 Express to create an installation for the
application.  The application works ok on the Windows 7 PC, but when
installed on a different PC (or on a Virtual Client PC using VMWare), I
always receive a message such as:

Unhandled exception has occurred in your application.  If you click
Continue, the application will ignore this error and attempt to
continue. If you click Quit, the application will close immediately.

Unable to load DLL 'SQLite.Interop.dll': The specified module could not
be found. (Exception from HRESULT: 0x8007007e).

I have tried to post this email about 5 times and it is always returned
saying: "The message's content type was not explicitly allowed."



Peter Walburn
Software Engineer
E-mail: peter.walb...@omega-data.com
Units 44-46 Howe Moss Avenue, Kirkhill Industrial Estate, Dyce, Aberdeen
AB21 0GP
Tel: +44 (0)1224 772763
Fax: +44 (0)1224 772783
www.omega-data.com





This is an email from Omega Data Services Ltd, a company registered in
Edinburgh, Scotland, with company number SC192323. Registered Office:
Maclay Murray & Spens, 66 Queens Road, Aberdeen, AB15 4YE. Tel:
01224-356130. Website: www.omega-data.com .
This email and any files transmitted are confidential and intended
solely for the individual or entity to whom they are addressed. Any
views or opinions expressed or presented are those of the author(s) and
may not necessarily represent those of the company and no representation
is given nor liability accepted for the accuracy or completeness of any
information contained in this email unless expressly stated to the
contrary. If you are not the intended recipient or have received this
email in error, you may not use, disseminate, forward, print or copy it,
but please notify the sender that you have received it in error and
remove the message from your system immediately.
Whilst we have taken reasonable precautions to ensure that this email
and any attachments have been checked for viruses, we cannot guarantee
that they are virus free, and we cannot accept liability for any damage
sustained as a result of software viruses. We would advise that you
carry out your own virus checks, especially before opening an
attachment.

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


[sqlite] Problem with SQLite when deployed.

2012-05-25 Thread Peter Walburn
Hi,

I have an application written in C# .Net 4.0 Framework.  I use SQLite within 
the application.  I have recently updated from an older version of SQLite to 
the latest version as I have moved to .Net Framework 4.0 and I received error 
messages about Mixed Mode Frameworks.

Anyway, I do the development on an 64-Bit Windows 7 operating system.  I use 
Installshield 2010 Express to create an installation for the application.  The 
application works ok on the Windows 7 PC, but when installed on a different PC 
(or on a Virtual Client PC using VMWare), I always receive a message such as:

Unhandled exception has occurred in your application.  If you click Continue, 
the application will ignore this error and attempt to continue. If you click 
Quit, the application will close immediately.

Unable to load DLL 'SQLite.Interop.dll': The specified module could not be 
found. (Exception from HRESULT: 0x8007007e).

I have tried to post this email about 5 times and it is always returned saying: 
"The message's content type was not explicitly allowed."



Peter Walburn
Software Engineer
E-mail: peter.walb...@omega-data.com 
Units 44-46 Howe Moss Avenue, Kirkhill Industrial Estate, 
Dyce, Aberdeen AB21 0GP
Tel: +44 (0)1224 772763
Fax: +44 (0)1224 772783
www.omega-data.com





This is an email from Omega Data Services Ltd, a company registered in 
Edinburgh, Scotland, with company number SC192323. Registered Office: Maclay 
Murray & Spens, 66 Queens Road, Aberdeen, AB15 4YE. Tel: 01224-356130. Website: 
www.omega-data.com .
This email and any files transmitted are confidential and intended solely for 
the individual or entity to whom they are addressed. Any views or opinions 
expressed or presented are those of the author(s) and may not necessarily 
represent those of the company and no representation is given nor liability 
accepted for the accuracy or completeness of any information contained in this 
email unless expressly stated to the contrary. If you are not the intended 
recipient or have received this email in error, you may not use, disseminate, 
forward, print or copy it, but please notify the sender that you have received 
it in error and remove the message from your system immediately.
Whilst we have taken reasonable precautions to ensure that this email and any 
attachments have been checked for viruses, we cannot guarantee that they are 
virus free, and we cannot accept liability for any damage sustained as a result 
of software viruses. We would advise that you carry out your own virus checks, 
especially before opening an attachment.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Michael Schlenker
Am 25.05.2012 14:27, schrieb Pavel Ivanov:
>> With regard to the second issue, several experienced people, including
>> Richard Hipp, have expressed the opinion in more than one occasion
>> that statically linking sqlite avoids some problems that can happen
>> otherwise.
> 
> OTOH, all people involved in supporting Linux distributions advocate
> against static inclusion and for use of dynamic libraries all the time
> so that if some bug or security vulnerability is fixed in SQLite it
> could be easily updated for everybody by upgrading only one package. I
> don't know though what they suggest to do if you need to use version
> of SQLite newer than distribution is currently providing.
> 
Well, it reduces the work for the Linux maintainers and some app
developers are notoriously slow to fix security bugs upstream.

Guess it really depends on the target audience.

For some library or other smaller app that is to be distributed with
some popular Linux distro or to another environment where someone else
is responsible for keeping the environment sane, it might make sense to
do dynamic linking to a system library. If the other person that manages
the environment fails, your app fails. If the other person does not
update the libs you are stuck and can only file bugs and wait.

But if you ship a major system, you really really want to keep your
environment under control. More work, but saves you from insane bugs due
to broken system libs and weird hacks around various system lib issues.
If some lib is broken, just patch it and ship a fixed version.

We typically run 'ldd' on all our libs and programs and match the
external dependencies to an allowed list. Anything not in that list
(which is usually tiny, stuff like libc) found in any library is
considered a bug in our product and gets patched (usually by either
disabling unnecessary dependencies at compile time or by shipping the
really needed dependencies in a working version).

So, if you can point to someone else (e.g. Linux distro maintainer) to
fix issues with broken libs for you, fine. But if you must fix them
yourself due to support contracts, you do not want to be forced to
depend on those.

Michael

-- 
Michael Schlenker
Software Architect

CONTACT Software GmbH   Tel.:   +49 (421) 20153-80
Wiener Straße 1-3   Fax:+49 (421) 20153-41
28359 Bremen
http://www.contact.de/  E-Mail: m...@contact.de

Sitz der Gesellschaft: Bremen
Geschäftsführer: Karl Heinz Zachries, Ralf Holtgrefe
Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite SELECT performance problem

2012-05-25 Thread Nick
Hi Michael, Kreith, Jonas,

Thanks for your response. I just tried to launch the binary manually,
and it worked very fast. I didn't figure out by myself that i
should've tried to launch the application outside of Visual Studio (I
was thinking that in "Release" mode VS doesn't slow down the execution
by debugging instruments). Sorry for raising a dust with all this.


2012/5/25 Black, Michael (IS) :
> Usng your sqlite3.exe
> CPU Time: user 2.156250 sys 2.078125
>
> Using your sqlite3.console.exe
> CPU Time: user 1.375000 sys 0.140625
>
> I'm afraid I don't see the problem since the pre-built is slower than your 
> executable for me.
>
>
> Michael D. Black
> Senior Scientist
> Advanced Analytics Directorate
> Advanced GEOINT Solutions Operating Unit
> Northrop Grumman Information Systems
>
>
>
> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
> behalf of Nick [eveningn...@gmail.com]
> Sent: Thursday, May 24, 2012 5:49 PM
> To: General Discussion of SQLite Database
> Subject: EXT :Re: [sqlite] SQLite SELECT performance problem
>
>
> The sizes of the executable files are almost identical - there's a few
> kilobytes difference.
> I have attached the original (downloaded from sqlite.org) sqlite3.exe,
> a compiled-by-myself sqlite3console.exe. And the source code. Also
> there's import tables dump (import tables are also very similar for
> both executables). I hope you can see the difference in the speed:
>
> http://dl.dropbox.com/u/74970714/Custom%20built%20SQLite3.exe%20Performance%20problem.rar
>
> There is also a database file. but it is quite large (71 Mb). You can
> download it here, to be able to test the SQL query:
>
> http://dl.dropbox.com/u/74970714/database.sqlite
>
> Thanks to anyone who can help!
>
> 2012/5/25 Simon Slavin :
>>
>> On 24 May 2012, at 11:13pm, Nick  wrote:
>>
>>> In my initial message I described some proof-of-concept that I've done.
>>>
>>> I downloaded sqlite3.exe (An SQLite command line tool) from the
>>> SQLite's website. I executed my query and I had to wait 4 seconds for
>>> it to complete.
>>>
>>> Then I downloaded sqlite3.c, sqlite3.h and shell.c, compiled them
>>> altogether (and got again the command line tool, but now i've built it
>>> by myself using Visual Studio) and executed the same query. It took 15
>>> seconds this time.
>>
>> I'm very sorry I missed that.  I have now re-read your original post.
>>
>> Can you compare the size of the two executable files for us ?  Are the 
>> various versions you're compiling (I understand you've tried several 
>> different compilation options) all definitely bigger than the one supplied 
>> on the SQLite site ?  It might give us something to investigate.  Also, I 
>> don't know how to do this under Windows, but do you have a way to check 
>> whether the versions made by Visual Studio address any DLLs or other 
>> libraries ?
>>
>> Simon.
>> ___
>> 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
> ___
> 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 does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Simon Slavin

On 25 May 2012, at 1:45pm, "Black, Michael (IS)"  wrote:

> We used to have tons of problems on Solaris due to shared libraries.  
> Numerous incompatibilities across multiple versions of Solaris.  Static link 
> always worked.

There are actually three options (depending on what's available on your 
platform):

A) Dynamic linking to a shared library (works when the user updates the library)

B) Static linking to a shared library (works only with specific library file)

C) Including the C code in the executable file.

Option (A) is the instinctive behaviour of a Windows programmer: look for a 
precompiled DLL and use that.  But SQLite is a very unusual API.  First, it's 
tiny, so the drawback associated with large libraries (size of distribution 
files, amount of hard disk taken up) disappear.  Secondly, it's very 'lite' and 
people don't tend to do a lot of programming around it.

The second one has more influence than you'd think.  The way professional-level 
libraries are used by professional programmers takes into account different 
behaviour of different versions.  If someone was to do this with SQLite then 
you would see code which looks like this:

init section:
int gSQLiteVersion = sqlite3_libversion_number()
if qSQLiteVersion = 030712
die "Please update your SQLite library to cure a bug in version 3.7.12 
of SQlite."
end if

and in various places in the code:

// check we have FOREIGN KEYs
if gSQLiteVersion < 030619 …
handle it a complicated and slow way with checking code
else
just check to see whether SQLite generated an error
end if

If you write code this way on a conventional desktop computer you end up with a 
flexible but very large API of your own which itself calls SQLite.  But almost 
nobody does this with SQLite because it's so 'lite' people are used to doing 
SQLite in one-liners.  Using SQLite then writing their own large library 
defeats the reason they picked SQLite in the first place.  And people 
programming small embedded/handheld devices definitely want something lite 
because that saves them memory, power, weight, and heat.  Again, writing their 
own library to call the SQLite functions defeats their purpose.

So people tend to write their software to work with one specific version, and 
let it fail if somehow another version is found.  So knowing precisely which 
version of SQLite your app is using is a great advantage.  So the DLL option 
is, unusually, not as persuasive for SQLite.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Black, Michael (IS)
On the 3rd hand (Medusa here) those of us involved in mission critical apps 
refuse to let people arbitrarily update packages that are part of the "system". 
 Things like the bug introduced in 3.7.12 being a prime example.



It's called "Configuration Control".  Some apps may depend on updated system 
libraries...just keep them out of my sandbox.  If our app needs a fix WE put it 
in under a controlled manner with regression testing, test system, and final 
deployment.  And we may include a newer version than the system is allowed to 
have.



Call me (and my configuration control panel) control freaks.



We used to have tons of problems on Solaris due to shared libraries.  Numerous 
incompatibilities across multiple versions of Solaris.  Static link always 
worked.





Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Pavel Ivanov [paiva...@gmail.com]
Sent: Friday, May 25, 2012 7:27 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] What does "The use of the amalgamation is 
recommended for all applications." mean, precisely?

OTOH, all people involved in supporting Linux distributions advocate
against static inclusion and for use of dynamic libraries all the time
so that if some bug or security vulnerability is fixed in SQLite it
could be easily updated for everybody by upgrading only one package. I
don't know though what they suggest to do if you need to use version
of SQLite newer than distribution is currently providing.


Pavel

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


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Richard Hipp
On Fri, May 25, 2012 at 8:27 AM, Pavel Ivanov  wrote:

> > With regard to the second issue, several experienced people, including
> > Richard Hipp, have expressed the opinion in more than one occasion
> > that statically linking sqlite avoids some problems that can happen
> > otherwise.
>
> OTOH, all people involved in supporting Linux distributions advocate
> against static inclusion and for use of dynamic libraries all the time
> so that if some bug or security vulnerability is fixed in SQLite it
> could be easily updated for everybody by upgrading only one package.


The security argument makes some sense for libraries like libz.so or
libjpeg.so, which are operating on unchecked content received from
untrusted sources, since a bug in those libraries could result in a
security breach.

Notice, however, that this is not the case with SQLite.  SQLite gets its
inputs from the application, not the user.  If your applications is feeding
unchecked content into SQLite from the open internet, then you have way
more serious problems (SQL injection) than any bug in SQLite.

Because of this, and our rigorous testing, SQLite has never caused a
security vulnerability to my knowledge, even with over 2 billion (2e9)
deployments.

So I reject that Linux distributors arguments that all libraries should be
dynamic.  In the case of SQLite, that merely leads to unwanted and
troublesome dependencies in the application.  It is far better to
statically link, so that your application uses exactly the same version of
SQLite on the end-users machine as was used during testing.

"Fly what you test and test what you fly."

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Pavel Ivanov
> With regard to the second issue, several experienced people, including
> Richard Hipp, have expressed the opinion in more than one occasion
> that statically linking sqlite avoids some problems that can happen
> otherwise.

OTOH, all people involved in supporting Linux distributions advocate
against static inclusion and for use of dynamic libraries all the time
so that if some bug or security vulnerability is fixed in SQLite it
could be easily updated for everybody by upgrading only one package. I
don't know though what they suggest to do if you need to use version
of SQLite newer than distribution is currently providing.


Pavel


On Fri, May 25, 2012 at 3:33 AM, Pierpaolo Bernardi  wrote:
> On Fri, May 25, 2012 at 9:03 AM, Sidney Cadot  wrote:
>
>> What I was wondering is whether the SQLite docs (written by you, I
>> presume) express a preference for using SQLite3 via inclusion of the
>> source (amalgamation) into ones project, vs. using a pre-compiled
>> library (as could be provided, for example, by a linux distribution).
>
> Separate files vs. amalgamation, and statically vs. dynamic linking of
> sqlite are two completely orthogonal issues.
>
> The manual section you quote refers only to the first of the two issue.
>
> With regard to the second issue, several experienced people, including
> Richard Hipp, have expressed the opinion in more than one occasion
> that statically linking sqlite avoids some problems that can happen
> otherwise.
>
> Evaluating the pro and the contra of the two choices for each
> particular project is a task that only the people involved in the
> project can perform.
>
> Hope this helps.
> P.
> ___
> 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] SQLite SELECT performance problem

2012-05-25 Thread Black, Michael (IS)
Usng your sqlite3.exe
CPU Time: user 2.156250 sys 2.078125

Using your sqlite3.console.exe
CPU Time: user 1.375000 sys 0.140625

I'm afraid I don't see the problem since the pre-built is slower than your 
executable for me.


Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems



From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Nick [eveningn...@gmail.com]
Sent: Thursday, May 24, 2012 5:49 PM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] SQLite SELECT performance problem


The sizes of the executable files are almost identical - there's a few
kilobytes difference.
I have attached the original (downloaded from sqlite.org) sqlite3.exe,
a compiled-by-myself sqlite3console.exe. And the source code. Also
there's import tables dump (import tables are also very similar for
both executables). I hope you can see the difference in the speed:

http://dl.dropbox.com/u/74970714/Custom%20built%20SQLite3.exe%20Performance%20problem.rar

There is also a database file. but it is quite large (71 Mb). You can
download it here, to be able to test the SQL query:

http://dl.dropbox.com/u/74970714/database.sqlite

Thanks to anyone who can help!

2012/5/25 Simon Slavin :
>
> On 24 May 2012, at 11:13pm, Nick  wrote:
>
>> In my initial message I described some proof-of-concept that I've done.
>>
>> I downloaded sqlite3.exe (An SQLite command line tool) from the
>> SQLite's website. I executed my query and I had to wait 4 seconds for
>> it to complete.
>>
>> Then I downloaded sqlite3.c, sqlite3.h and shell.c, compiled them
>> altogether (and got again the command line tool, but now i've built it
>> by myself using Visual Studio) and executed the same query. It took 15
>> seconds this time.
>
> I'm very sorry I missed that.  I have now re-read your original post.
>
> Can you compare the size of the two executable files for us ?  Are the 
> various versions you're compiling (I understand you've tried several 
> different compilation options) all definitely bigger than the one supplied on 
> the SQLite site ?  It might give us something to investigate.  Also, I don't 
> know how to do this under Windows, but do you have a way to check whether the 
> versions made by Visual Studio address any DLLs or other libraries ?
>
> Simon.
> ___
> 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
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] How to write and read the same sqlite3 DB in memory concurrently in two thread?

2012-05-25 Thread 吴 毅
Now I am writing datas to sqlite3 DB in memory(":memory:") in a thread .
And concurrently I want to read the datas of the same DB in memory too.
but While i used the same object of sqlite3 to write and read, i had got the 
error:SQLITE_MISUSE.
If i use the different objects of sqlite3 to write and read concurrently,these 
objects get the different DB in memory.This is not I want to do.I want to get 
datas of the same database.
Moreover, I don't plan to write and read the database in disks too.Becase I 
thick it's more faster to operate in memory.
I open the database in the way of "m_sqliteDB.open(":memory:");" now.

How to write and read the same sqlite3 DB in memory concurrently in two thread?

That might be?

thank you.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Pierpaolo Bernardi
On Fri, May 25, 2012 at 9:03 AM, Sidney Cadot  wrote:

> What I was wondering is whether the SQLite docs (written by you, I
> presume) express a preference for using SQLite3 via inclusion of the
> source (amalgamation) into ones project, vs. using a pre-compiled
> library (as could be provided, for example, by a linux distribution).

Separate files vs. amalgamation, and statically vs. dynamic linking of
sqlite are two completely orthogonal issues.

The manual section you quote refers only to the first of the two issue.

With regard to the second issue, several experienced people, including
Richard Hipp, have expressed the opinion in more than one occasion
that statically linking sqlite avoids some problems that can happen
otherwise.

Evaluating the pro and the contra of the two choices for each
particular project is a task that only the people involved in the
project can perform.

Hope this helps.
P.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-25 Thread Sidney Cadot
Hi,

> I approve of your translation.

That interpretation concerns the relative merits of using the separate
sources vs the amalgamation, if I understand correctly. Barring
special circumstances, the use of the amalgamation is the preferred
way; that is understood.

What I was wondering is whether the SQLite docs (written by you, I
presume) express a preference for using SQLite3 via inclusion of the
source (amalgamation) into ones project, vs. using a pre-compiled
library (as could be provided, for example, by a linux distribution).

Some readings of the documentation suggest that SQLite advocates
direct inclusion over using the software as a library:

   "The amalgamation contains everything you need to integrate
SQLite into a larger project. Just copy the amalgamation into your
source directory and compile it along with the other C code files in
your project. " - http://www.sqlite.org/amalgamation.html

   "The use of the amalgamation is recommended for all
applications." - http://www.sqlite.org/howtocompile.html

I wonder if that is the case. I think that using SQLite3 via library
and via source are both actively supported ways of using the library,
as evidenced by the distribution of both the amalgamated source and a
tarbal where a configure/make/make install will yield a library. The
choice should be left to the user, depending on their circumstances.

I am wondering where you stand on this.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users