Re: [sqlite] SQLite - Dropping TEMP table doesn't free allocated memory

2012-12-28 Thread Ryan Johnson
On 28/12/2012 4:04 PM, Krzysztof wrote: I don't understand :/ So what is solution in my case? What is the problem you need to solve? If I understand correctly, your app repeatedly creates and deletes ~80MB of temp data. If so, it's actually a good thing that sqlite doesn't release the memory,

Re: [sqlite] Bug in Cygwin SQLite: temporary table creation fails

2012-12-28 Thread Warren Young
On 12/27/2012 21:17, Joe Mistachkin wrote: I just looked at the patch briefly and I'm wondering if we could use the existing GetTempPath[A/W] as another fallback directory? The way I see it is, we are migrating from a hybrid Windows/Cygwin mode toward a purer POSIX style. Eventually, I want

Re: [sqlite] SQLite - Dropping TEMP table doesn't free allocated memory

2012-12-28 Thread Kees Nuyt
On Sat, 29 Dec 2012 00:04:12 +0100, Krzysztof wrote: > I don't understand :/ So what is solution in my case? You could try : PRAGMA temp_store=file; immediately followed by: PRAGMA temp_store=memory; Please note: http://sqlite.org/pragma.html#pragma_temp_store

Re: [sqlite] SQLite - Dropping TEMP table doesn't free allocated memory

2012-12-28 Thread Krzysztof
I don't understand :/ So what is solution in my case? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite - Dropping TEMP table doesn't free allocated memory

2012-12-28 Thread Simon Slavin
On 28 Dec 2012, at 10:16pm, Krzysztof wrote: > I thought about reopen connection (this would solve my problem in simple > way) but my dependencies are tricky. I'm using free pascal which have > TSQLite3Connection. This class handle sqlite connection, so I can attach > multiple

Re: [sqlite] SQLite - Dropping TEMP table doesn't free allocated memory

2012-12-28 Thread Krzysztof
I thought about reopen connection (this would solve my problem in simple way) but my dependencies are tricky. I'm using free pascal which have TSQLite3Connection. This class handle sqlite connection, so I can attach multiple tables in the same session, so I can share temp tables between all tables

Re: [sqlite] Fwd: Write performance question for 3.7.15

2012-12-28 Thread Michael Black
Perhaps the rowid index cache gets too big? I assume you don't have any indexes of your own? Does the knee change if you say, double your cache_size? Default should be 2000; pragma cache_size=4000; -Original Message- From: sqlite-users-boun...@sqlite.org

Re: [sqlite] Write performance question for 3.7.15

2012-12-28 Thread Dan Frankowski
On Fri, Dec 28, 2012 at 3:34 PM, Dan Frankowski wrote: > I am running a benchmark of inserting 100 million (100M) items into a > table. I am seeing performance I don't understand. Graph: > http://imgur.com/hH1Jr. Can anyone explain: > > 1. Why does write speed (writes/second)

[sqlite] Fwd: Write performance question for 3.7.15

2012-12-28 Thread Dan Frankowski
I am running a benchmark of inserting 100 million (100M) items into a table. I am seeing performance I don't understand. Graph: http://imgur.com/hH1Jr. Can anyone explain: 1. Why does write speed (writes/second) slow down dramatically around 28M items? 2. Are there parameters (perhaps related to

Re: [sqlite] SQLite - Dropping TEMP table doesn't free allocated memory

2012-12-28 Thread Richard Hipp
On Fri, Dec 28, 2012 at 10:04 AM, Krzysztof wrote: > Hi, > > I'm using PRAGMA temp_store=2 so all temp tables are created in memory. I > have temp table with 1 000 000 000 records. Memory used by my test > application grow up to ~80 MB. If I delete all records from this table or >

Re: [sqlite] SQLite - Dropping TEMP table doesn't free allocated memory

2012-12-28 Thread Pavel Ivanov
You may be hitting the memory fragmentation issue. Try to run your application with different memory managers (Hoard is my favorite - http://www.hoard.org/) and see if the memory consumption is the same. Also if you close all connections to your database (and other SQLite databases too) does

Re: [sqlite] Select statements using date function such as date('-1 day')

2012-12-28 Thread Keith Christian
On Fri, Dec 28, 2012 at 12:26 PM, Igor Tandetnik wrote: > You forgot to tell date() function which date it's supposed to subtract one > day from. Make it date('now', '-1 day') Thanks, Igor, that fixes the problem, both of these work! select * from general where

Re: [sqlite] useful Perl modules for working with SQLite databases?

2012-12-28 Thread Larry Brasfield
James Hartley wrote: SQLite has recently been added to the base installation to the Unix-variant I frequently use. This is a good thing. I'm looking at the various CPAN modules which are available in the ancillary ports sponsored by that Unix-like project, & I see that DBD::SQLite package

[sqlite] useful Perl modules for working with SQLite databases?

2012-12-28 Thread James Hartley
SQLite has recently been added to the base installation to the Unix-variant I frequently use. This is a good thing. I'm looking at the various CPAN modules which are available in the ancillary ports sponsored by that Unix-like project, & I see that DBD::SQLite package could be updated. This

Re: [sqlite] Select statements using date function such as date('-1 day')

2012-12-28 Thread Igor Tandetnik
On 12/28/2012 2:14 PM, Keith Christian wrote: Is it possible to use the 'date' function to select a date using the date function as below? select * from general where foobar_date=date('-1 day'); You forgot to tell date() function which date it's supposed to subtract one day from.

[sqlite] Select statements using date function such as date('-1 day')

2012-12-28 Thread Keith Christian
Running SQLite version 3.7.13 2012-06-11 02:05:22. A table has a date field with entries in this range: 2012-10-25 through 2012-12-27. 2735080|2012-12-27 2735081|2012-12-27 2735083|2012-12-27 2735084|2012-12-27 2735085|2012-12-27 2735086|2012-12-27 2735087|2012-12-27 2735088|2012-12-27

Re: [sqlite] SQLite - Dropping TEMP table doesn't free allocated memory

2012-12-28 Thread Simon Slavin
On 28 Dec 2012, at 6:01pm, Krzysztof wrote: > Can I call vacuum on custom tables (for example only on temp tables) ? > Because vacuum takes some time (my "normal" tables are big and often > modified, trim of those tables are not important for me) and I would like > to free up

Re: [sqlite] SQLite - Dropping TEMP table doesn't free allocated memory

2012-12-28 Thread Krzysztof
Can I call vacuum on custom tables (for example only on temp tables) ? Because vacuum takes some time (my "normal" tables are big and often modified, trim of those tables are not important for me) and I would like to free up memory taken only by temp tables

Re: [sqlite] SQLite - Dropping TEMP table doesn't free allocated memory

2012-12-28 Thread Simon Slavin
On 28 Dec 2012, at 3:04pm, Krzysztof wrote: > If I delete all records from this table or > drop table, then my application still use 80 MB of memory. I have tried > also PRAGMA shrink_memory. Why sqlite don't free memory? SQLite does not free up space from a database until it

[sqlite] SQLite - Dropping TEMP table doesn't free allocated memory

2012-12-28 Thread Krzysztof
Hi, I'm using PRAGMA temp_store=2 so all temp tables are created in memory. I have temp table with 1 000 000 000 records. Memory used by my test application grow up to ~80 MB. If I delete all records from this table or drop table, then my application still use 80 MB of memory. I have tried also

Re: [sqlite] Update with two tables

2012-12-28 Thread Hick Gunter
You need two UPDATEs to change rows in two tables. BEGIN; UPDATE TabAgeFattProdutt SET Stato ='I' WHERE NumFattAG = -- the INNER JOIN evaluates to a aingle value -- (SELECT NumFatt FROM TabTestaFattAG WHERE NumFatt = '23/12' -- ) ; UPDATE TabTestaFattAG SET

Re: [sqlite] Update with two tables

2012-12-28 Thread Leonardodavinci
hi i.m new user with sqlite and now i have this problem with update function: with mysql run this script: UPDATE TabAgeFattProdutt INNER JOIN TabTestaFattAG ON TabAgeFattProdutt.NumFattAG = TabTestaFattAG.NumFatt SET TabAgeFattProdutt.Stato ='I', TabTestaFattAG.StatoFatt = 'Chiusa' WHERE