Re: [sqlite] Can't load sqlite 3.75 under tcl 8.4.4.0

2011-04-11 Thread thoselaings
As you suggested I tried the load command with the following results:

% load C:/Tcl/lib/sqlite3/sqlite3.dll
couldn't find procedure Sqlite_Init

And then I examined the pkgindex file - and you were right - there is
a space.
Correcting that, and then doing the package require command again, I
get:

% package require sqlite
couldn't find procedure Sqlite3_Init

or alternatively:
% package require sqlite 3.7.5
couldn't find procedure Sqlite3_Init


Under "load" - Sqlite_Init is missing
Under "package require" (either version) - Sqlite3_Init is missing
Why the difference?

Any suggestions on how to proceed next?

I appreciate your responses.



On Apr 10, 10:30 pm, Dan Kennedy  wrote:
> On 04/10/2011 11:43 AM, thoselai...@shaw.ca wrote:
>
> > % package require sqlite
> > couldn't load library "C:/Tcl/lib/sqlite3/sqlite3/.dll": this library or a 
> > dependent library could not be found in library path
>
> > What is sqlite3/.dll ?
> > Where did that "/" come from?
>
> > The pkgindex file contains -
>
> > package ifneeded sqlite 3.7.5 [list load [file join $dir \
> >          sqlite3[info sharedlibextension]] sqlite3]
>
> Maybe there is a space or tab or something between "sqlite3" and
> "[info".
>
> Does the command "load C:/Tcl/lib/sqlite3/sqlite3.dll" work if
> you enter it directly?
> ___
> sqlite-users mailing list
> sqlite-us...@sqlite.orghttp://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] Weird CHECK behavior

2011-04-11 Thread Duquette, William H (318K)
On 4/7/11 4:37 PM, "Jay A. Kreibich"  wrote:


>On Thu, Apr 07, 2011 at 03:45:18PM -0700, Duquette, William H (318K)
>scratched on the wall:
>
>> Hmmm.  I tried this; but this constraint fails for ANY value I give it.
>
>> I tried this:
>> 
>>  CHECK (0.0 <= CAST (value AS real))
>> 
>> But this just casts the string 'NONESUCH' to 0.0, which is no help.
>
>
>  What about   CHECK( value == CAST( value AS real ) ) ?

It took me a while to get back to this--but, YES, that does the trick.
Thanks very much!

Will


>
>
>  Otherwise, I'm not a Tcl guy, so someone else will need to jump in.
>
>   -j
>
>-- 
>Jay A. Kreibich < J A Y  @  K R E I B I.C H >
>
>"Intelligence is like underwear: it is important that you have it,
> but showing it to the wrong people has the tendency to make them
> feel uncomfortable." -- Angela Johnson

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


[sqlite] 1st Call For Papers, 18th Annual Tcl/Tk Conference 2011

2011-04-11 Thread Andreas Kupries
18th Annual Tcl/Tk Conference (Tcl'2011)
http://www.tcl.tk/community/tcl2011/

October 24 - 28, 2011
Comfort Suites Manassas

Manassas, Virgina, USA

Important Dates:

Abstracts and proposals due   August26, 2011
Notification to authors   September 12, 2011
WIP and BOF reservations open August 1, 2011
Author materials due  October9, 2011
Tutorials Start   October   24, 2011
Conference starts October   26, 2011

Email Contact:tclconfere...@googlegroups.com

Submission of Summaries

Tcl/Tk 2011 will be held in Manassas, Virgina, USA from
October 24 - 28, 2011. The program committee is asking for papers and
presentation proposals from anyone using or developing with Tcl/Tk
(and extensions). Past conferences have seen submissions covering a
wide variety of topics including:

* Scientific and engineering applications
* Industrial controls
* Distributed applications and Network Managment
* Object oriented extensions to Tcl/Tk
* New widgets for Tk
* Simulation and application steering with Tcl/Tk
* Tcl/Tk-centric operating environments
* Tcl/Tk on small and embedded devices
* Medical applications and visualization
* Use of different programming paradigms in Tcl/Tk and proposals for new
  directions.
* New areas of exploration for the Tcl/Tk language

This year is the fourth year that the Tcl community is participating
in the Google Summer of Code.  The conference program committee would
like to encourage submissions that report on the Tcl projects selected
for Google SoC 2011.

Submissions should consist of an abstract of about 100 words and a
summary of not more than two pages, and should be sent as plain text
to  no later than August 30,
2011. Authors of accepted abstracts will have until October 14, 2011
to submit their final paper for the inclusion in the conference
proceedings. The proceedings will be made available on digital media,
so extra materials such as presentation slides, code examples, code
for extensions etc. are encouraged.

Printed proceedings will be produced as an on-demand book at lulu.com

The authors will have 25 minutes to present their paper at the
conference.

The program committee will review and evaluate papers according to the
following criteria:

* Quantity and quality of novel content
* Relevance and interest to the Tcl/Tk community
* Suitability of content for presentation at the conference

Proposals may report on commercial or non-commercial systems, but
those with only blatant marketing content will not be accepted.

Application and experience papers need to strike a balance between
background on the application domain and the relevance of Tcl/Tk to
the application. Application and experience papers should clearly
explain how the application or experience illustrates a novel use of
Tcl/Tk, and what lessons the Tcl/Tk community can derive from the
application or experience to apply to their own development efforts.

Papers accompanied by non-disclosure agreements will be returned to
the author(s) unread. All submissions are held in the highest
confidentiality prior to publication in the Proceedings, both as a
matter of policy and in accord with the U. S. Copyright Act of 1976.

The primary author for each accepted paper will receive registration
to the Technical Sessions portion of the conference at a reduced rate.

Other Forms of Participation

The program committee also welcomes proposals for panel discussions of
up to 90 minutes. Proposals should include a list of confirmed
panelists, a title and format, and a panel description with position
statements from each panelist. Panels should have no more than four
speakers, including the panel moderator, and should allow time for
substantial interaction with attendees. Panels are not presentations
of related research papers.

Slots for Works-in-Progress (WIP) presentations and Birds-of-a-Feather
sessions (BOFs) are available on a first-come, first-served basis
starting in August 1, 2011. Specific instructions for reserving WIP
and BOF time slots will be provided in the registration information
available in June 2011. Some WIP and BOF time slots will be held open
for on-site reservation. All attendees with an interesting work in
progress should consider reserving a WIP slot.

Registration Information

More information on the conference is available the conference Web
site (http://www.tcl.tk/community/tcl2011/) and will be published on
various Tcl/Tk-related information channels.

To keep in touch with news regarding the conference and Tcl events in
general, subscribe to the tcl-announce list. See:
http://aspn.activestate.com/ASPN/Mail/ to subscribe to the
tcl-announce mailing list.


Conference Committee

Clif Flynt  Noumena CorpGeneral Chair, Website 
Admin
Andreas Kupries ActiveState Software Inc.   Program Chair
Cyndy Lilagan   Iomas Research, LLC
Brian Griffin   Mentor Graphics
Ron Fox 

Re: [sqlite] Effect of using WAL on technical support

2011-04-11 Thread Samuel Neff
Thanks for confirming this.  I did some more testing and turned off
connection pooling in SQLite.NET and then the connections got closed
correctly.

I'll plan on rewriting my own connection pool implementation and not using
the one provided by the wrapper.

Sam


On Sun, Apr 10, 2011 at 10:08 PM, Simon Slavin  wrote:

>
> On 11 Apr 2011, at 2:48am, Richard Hipp wrote:
>
> > On Sun, Apr 10, 2011 at 9:36 PM, Samuel Neff 
> wrote:
> >
> >> I'm sorry, my statement was misleading.  I'm referring to immediately
> after
> >> our application is closed.
> >>
> >> We're seeing that even if the application is gracefully shut down, the
> -wal
> >> and -shm files are still there.  In order to clear them I need to open
> the
> >> database files with sqlite3.exe and issue a "pragma wal_checkpoint".
> >
> > The -wal and -shm are deleted when the last connection to the database
> > closes.  If you are having -wal and -shm files left over, that implies
> that
> > you are not closing all your database connections before you exit.
>
> Yes !  If your application has exited and you still have a journal file,
> something is wrong.  Are you closing your connection correctly, however
> ASP.NET wants you to do it ?
>
> 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


Re: [sqlite] User function calculates for every row before applying any where condition

2011-04-11 Thread Dan Kennedy
On 04/11/2011 05:32 PM, Enrico Thierbach wrote:
>
> On 11.04.2011, at 10:18, Maxim V. Shiyanovsky wrote:
>
>> Does SQlite (3.6.23.1 to be precise) perform any optimization when user 
>> function appears in the statement?
>>
>> I defined custom function MY_FUNC(a TEXT, b TEXT) and bound it with 
>> sqlite3_create_function.
>>
>> Suppose, we have 2 tables:
>> Tbl1(id1 INTEGER, id2 INTEGER, str TEXT)  with 2 records
>> Tbl2(id INTEGER, Tbl1_id INTEGER, str TEXT) with 5000 records
>>
>> Using query:
>> SELECT Tbl2.id, MY_FUNC(Tbl1.str, Tbl2.str) FROM Tbl2 JOIN Tbl1 ON 
>> Tbl1.id1=Tbl2.Tbl1_id WHERE Tbl2.id>1000 AND Tbl1.id2=1 LIMIT 50
>> I hope MY_FUNC would be evaluated 50 times at most, but it appeared 1.
>>
>> Using  subquery does not do anything with the problem.
>
> SELECT sq.id, MY_FUNC(sq.str1, sq.str2) FROM
>(SELECT Tbl2.id, Tbl1.str AS str1, Tbl2.str AS str2 FROM Tbl2 JOIN Tbl1 ON 
> Tbl1.id1=Tbl2.Tbl1_id WHERE Tbl2.id>1000 AND Tbl1.id2=1 LIMIT 50) sq
>
> really doesn't help?

This doesn't seem right. What is the whole database schema? Is this
the exact query in use or a modified version?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] User function calculates for every row before applying any where condition

2011-04-11 Thread Enrico Thierbach

On 11.04.2011, at 10:18, Maxim V. Shiyanovsky wrote:

> Does SQlite (3.6.23.1 to be precise) perform any optimization when user 
> function appears in the statement?
> 
> I defined custom function MY_FUNC(a TEXT, b TEXT) and bound it with 
> sqlite3_create_function.
> 
> Suppose, we have 2 tables:
> Tbl1(id1 INTEGER, id2 INTEGER, str TEXT)  with 2 records
> Tbl2(id INTEGER, Tbl1_id INTEGER, str TEXT) with 5000 records
> 
> Using query:
> SELECT Tbl2.id, MY_FUNC(Tbl1.str, Tbl2.str) FROM Tbl2 JOIN Tbl1 ON 
> Tbl1.id1=Tbl2.Tbl1_id WHERE Tbl2.id>1000 AND Tbl1.id2=1 LIMIT 50
> I hope MY_FUNC would be evaluated 50 times at most, but it appeared 1.
> 
> Using  subquery does not do anything with the problem.

SELECT sq.id, MY_FUNC(sq.str1, sq.str2) FROM
  (SELECT Tbl2.id, Tbl1.str AS str1, Tbl2.str AS str2 FROM Tbl2 JOIN Tbl1 ON 
Tbl1.id1=Tbl2.Tbl1_id WHERE Tbl2.id>1000 AND Tbl1.id2=1 LIMIT 50) sq

really doesn't help?

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


[sqlite] User function calculates for every row before applying any where condition

2011-04-11 Thread Maxim V. Shiyanovsky
Does SQlite (3.6.23.1 to be precise) perform any optimization when user 
function appears in the statement?

I defined custom function MY_FUNC(a TEXT, b TEXT) and bound it with 
sqlite3_create_function.

Suppose, we have 2 tables:
Tbl1(id1 INTEGER, id2 INTEGER, str TEXT)  with 2 records
Tbl2(id INTEGER, Tbl1_id INTEGER, str TEXT) with 5000 records

Using query:
SELECT Tbl2.id, MY_FUNC(Tbl1.str, Tbl2.str) FROM Tbl2 JOIN Tbl1 ON 
Tbl1.id1=Tbl2.Tbl1_id WHERE Tbl2.id>1000 AND Tbl1.id2=1 LIMIT 50
I hope MY_FUNC would be evaluated 50 times at most, but it appeared 1.

Using  subquery does not do anything with the problem.
Any suggestion on how to avoid 1 evaluation of time-consuming function?

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


Re: [sqlite] SQLite question

2011-04-11 Thread Simon Slavin

On 11 Apr 2011, at 3:59am, Guilherme wrote:

> Well, I thought that if the execution followed a plan.. I could get for
> example, the cardinality from the results until a point, say a join.
> Imagine a query with 15 joins.. the execution would make a join, than, with
> the results from this join, make another join with results form other
> joins.. and so on..  I could get the cardinalities before the joins and see
> if it is too different from the estimated.. and maybe change the way the
> remainder of joins will be executed...
> 
> now, if the execution it's just a nested loop, I can't get any partial
> cardinality...

You can tell what it's doing by doing what Igor told you two posts ago: use 
EXPLAIN and EXPLAIN QUERY PLAN and look at the output.  If you read the output 
of EXPLAIN QUERY PLAN using this page

http://www.sqlite.org/eqp.html

you will understand what SQLite has chosen to do with your statement.  If you 
read the output of EXPLAIN using the opcodes on this page

http://www.sqlite.org/opcode.html

you will understand how SQLite decided to implement that.

Your underlying task appears to be second-guessing how SQLite's search 
optimisation works.  I have to warn you that the people who wrote it are good 
at what they do, and they've had 11 years of feedback from real-world use to 
improve the programming behind it.  I'd suggest that you learn how the existing 
algorithms work in great detail (i.e. read the source code) before trying to 
improve on what they've done.

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