[sqlite] Reading Blob/Writing to File in C# 2008

2009-06-16 Thread Seysan
I still have that problem. can anyone help me in right direction? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Question about searches

2009-06-16 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John Machin wrote: > I have developed a table which maps most latin-decorated Unicode > characters into the non-decorated basic form. This is a fascinating article by Sean Burke (a linguist) about converting all Unicode characters into US-ASCII.

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread John Machin
On 17/06/2009 11:52 AM, Dennis Cote wrote: > Jens Páll Hafsteinsson wrote: >> Closing and opening again did not speed up steps 1-4, it actually slowed >> things down even more. The curve from the beginning is a bit similar to a >> slightly flattened log curve. When I closed the database and

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Jay A. Kreibich
On Wed, Jun 17, 2009 at 11:52:45AM +1000, John Machin scratched on the wall: > On 17/06/2009 6:17 AM, Hoover, Jeffrey wrote: > > > One other note, if you have a primary key whose value is continually > > increasing your pk index can become imbalanced and therefore > > inefficient. > > A B-tree

Re: [sqlite] Question about searches

2009-06-16 Thread John Machin
On 17/06/2009 1:19 AM, Christophe Leske wrote: >>> So far , so good, but my client also expects ANY simplification of a >>> character to be recognized: >>> Cote d'azur for instance should return "Côte d'azur" >>> or the Sao Paulo issue - how can a search for "Sao Paulo" return "Sào >>> Paulo"

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Dennis Cote
Jens Páll Hafsteinsson wrote: > Closing and opening again did not speed up steps 1-4, it actually slowed > things down even more. The curve from the beginning is a bit similar to a > slightly flattened log curve. When I closed the database and started the test > again, a similar curve appeared

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread John Machin
On 17/06/2009 6:17 AM, Hoover, Jeffrey wrote: > One other note, if you have a primary key whose value is continually > increasing your pk index can become imbalanced and therefore > inefficient. A B-tree becomes imbalanced? How so? http://www.sqlite.org/fileformat.html#btree_structures says:

Re: [sqlite] minimum cache_size for a database connection?

2009-06-16 Thread D. Richard Hipp
On Jun 16, 2009, at 8:28 PM, Dave Toll wrote: > Hello list > > > > I've noticed that if I call "PRAGMA cache_size=0", my database rows > are > still cached (very little disk access observed). If I call "PRAGMA > cache_size=1" I can see that there is very little caching (disk access >

[sqlite] minimum cache_size for a database connection?

2009-06-16 Thread Dave Toll
Hello list I've noticed that if I call "PRAGMA cache_size=0", my database rows are still cached (very little disk access observed). If I call "PRAGMA cache_size=1" I can see that there is very little caching (disk access observed). Is there a minimum allowed cache_size setting? Does

Re: [sqlite] Sqlite3 database upgrade from 3.5.4 to 3.6.15 issue

2009-06-16 Thread D. Richard Hipp
On Jun 16, 2009, at 6:03 PM, Kalyani Phadke wrote: > > if I create dump using sqlite3.5.4 and recreate DB using that dump > data > using sqlite3.5.4,everything works fine. if I create dump using > sqlite3.5.4 and recreate DB using that dump data using > sqlite3.6.15,gets > error. > > The

Re: [sqlite] Reading Blob/Writing to File in C# 2008

2009-06-16 Thread Joel Lucsy
Hmmm, I know I've done this before. I'll have to dig deeper and find an example. -- Joel LucsySeysan wrote: When I used your code I get: No current row If I use: rdr.Read(); before your code, I get the same exception as before. ___ sqlite-users

Re: [sqlite] Datatypes (D. Richard Hipp)

2009-06-16 Thread Fred Williams
I'm aware of the limitations of the 92 Standard, as I too have suffered the same fate. But one thing for sure, conforming to the standard certainly makes migration between "Standard" implementations somewhat simpler. I'm not speaking standardally but speaking logically. (i.e. Mr. Spock, logical)

[sqlite] Reading Blob/Writing to File in C# 2008

2009-06-16 Thread Seysan
When I used your code I get: No current row If I use: rdr.Read(); before your code, I get the same exception as before. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Reading Blob/Writing to File in C# 2008

2009-06-16 Thread AFShin Abdollahi
The rdr is: SQLiteDataReader rdr; ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Reading Blob/Writing to File in C# 2008

2009-06-16 Thread Joel Lucsy
On Tue, Jun 16, 2009 at 6:44 PM, Seysan wrote: > String cmd = String.Format("SELECT filename,content FROM documents > WHERE did={0}",did); >           contentCommand = sqlconn.CreateCommand(); >           contentCommand.CommandText = cmd; >           rdr =

Re: [sqlite] Reading Blob/Writing to File in C# 2008

2009-06-16 Thread Joel Lucsy
On Tue, Jun 16, 2009 at 6:44 PM, Seysan wrote: > String cmd = String.Format("SELECT filename,content FROM documents > WHERE did={0}",did); >           rdr = contentCommand.ExecuteReader(); What type is rdr? I believe it should be byte[] -- Joel Lucsy "The dinosaurs became

[sqlite] Reading Blob/Writing to File in C# 2008

2009-06-16 Thread Seysan
Hello, I'm Using "System.Data.SQLite" in VS 2008 C#. I'm using DataReader to read the data. Everything works find except the BLOB. I want to get that Blob and Write it to a File. Blob data is mostly Picture and Music. Here a bit of Code: did-> is the document id. String cmd =

Re: [sqlite] NULL data .dump command

2009-06-16 Thread Joanne Pham
Hi All, I ran two queries:     1) select * from signature;         I didn't see the "SQL error: database disk image is malformed"     2) But if I ran the "select * from sig order by peerid;" then I have seen the malformed         ...        

[sqlite] NULL data .dump command

2009-06-16 Thread Joanne Pham
Hi All, I have the table is defined as below: CREATE TABLE `signature` (   `sig` char(50) NOT NULL,   `id' bigint(20) default '0', But I have ran the folowing command:     .output mySelect     select * from signature;     then I didn't see NULL values in the mySelect file at all But I ran

Re: [sqlite] Sqlite3 database upgrade from 3.5.4 to 3.6.15 issue

2009-06-16 Thread Kalyani Phadke
if I create dump using sqlite3.5.4 and recreate DB using that dump data using sqlite3.5.4,everything works fine. if I create dump using sqlite3.5.4 and recreate DB using that dump data using sqlite3.6.15,gets error. The text generated from .dump command of sqlite3 version 3.5.4. CREATE TABLE

Re: [sqlite] Datatypes (D. Richard Hipp)

2009-06-16 Thread Fred Williams
I'll settle for wishful thinking if that is what it takes to clone a table schema with a Create...Select...statement. Fred -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]on Behalf Of Igor Tandetnik Sent: Tuesday, June 16, 2009 12:23 PM

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Douglas E. Fajardo
This may be a red herring, but how do you generate the 'random' characters for the test? Could entropy exhaustion affecting the results? Just a thought... *** Doug Fajardo -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of P

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Hoover, Jeffrey
I vacuum frequently, particular after large updates or deletes. Two other potential optimizations of inserts (you may already be doing this): - use bulk insert - encapsulate the inserts within a transaction One other note, if you have a primary key whose value is continually increasing your pk

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Wes Freeman
VACUUM cleaned up the file in my current test, after 1200 iterations, making it run at ~4.6seconds again, rather than ~5.1. It seemed to get it almost back to the performance of a clean file. Didn't know about the vacuum command--Cool. By the way, the vacuum operation takes ~1.6 seconds for my

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Wes Freeman
On Tue, Jun 16, 2009 at 2:51 PM, Jens Páll Hafsteinsson wrote: > Closing and opening again did not speed up steps 1-4, it actually slowed > things down even more. The curve from the beginning is a bit similar to a > slightly flattened log curve. When I closed the database and

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread P Kishor
On Tue, Jun 16, 2009 at 1:59 PM, Jens Páll Hafsteinsson wrote: > Ok, but you might have to run this a bit longer (or more iterations). I ran the code a bit longer, and yes, I do notice an increase. Here are my results after 610 iterations... I have provided the numbers for 10

Re: [sqlite] Datatypes (D. Richard Hipp)

2009-06-16 Thread Nicolas Williams
D. Richard Hipp wrote: > It was done to fix a bug. > > SQLite allows arbitrary text as the "datatype" of a column. So you > could say (for example): > > CREATE TABLE t1(a "duh! ++ x hi, yall!(+123)" unique); > > And the datatype for t1.a would be "duh! ++ x hi, yall!(+123)". It > used to

Re: [sqlite] Sqlite3 database upgrade from 3.5.4 to 3.6.15 issue

2009-06-16 Thread D. Richard Hipp
On Jun 16, 2009, at 3:10 PM, Kalyani Phadke wrote: > But before entering the bug , I would like to find out how this > happened. Whats the cause of it. Because I am not able to duplicate it > all the time. IS there any way to find out what went wrong? > Thanks, >> I have to go manually and edit

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Jens Páll Hafsteinsson
Wes, I gather you are using version 3.6.14 in this test (?) Please also try version 3.6.15 since I'm seeing drastically different behavior using that version (starting similarly fast as .14 but quickly slowing down after about 15 iterations and then leveling off after 22 iterations). JP

Re: [sqlite] Sqlite3 database upgrade from 3.5.4 to 3.6.15 issue

2009-06-16 Thread Kalyani Phadke
But before entering the bug , I would like to find out how this happened. Whats the cause of it. Because I am not able to duplicate it all the time. IS there any way to find out what went wrong? Thanks, -Kalyani -Original Message- From: sqlite-users-boun...@sqlite.org

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Jens Páll Hafsteinsson
Thanks for the info Konrad. This is very similar to what I'm doing so that might be the case. Just for curiosity's sake, I might try to drop the table in-between the runs to see what happens. JP -Original Message- From: sqlite-users-boun...@sqlite.org

Re: [sqlite] Sqlite3 database upgrade from 3.5.4 to 3.6.15 issue

2009-06-16 Thread D. Richard Hipp
On Jun 16, 2009, at 2:53 PM, Kalyani Phadke wrote: > I am using sqlite version 3.6.15.I upgraded my database from sqlite > 3.5.4 to 3.6.15. I am not able to open database from sqlite3.exe cmd > utility . > I can do sqlite3.exe test.DB but if type > .database ,it gives me error malformed database

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Jens Páll Hafsteinsson
Ok, but you might have to run this a bit longer (or more iterations). My first 10 runs give the following results (in seconds): 1 15,681 2 16,010 3 16,093 4 16,168 5 16,057 6 16,585 7 16,114 8 16,596 9 16,115 10 16,270 Jumping around a

[sqlite] Sqlite3 database upgrade from 3.5.4 to 3.6.15 issue

2009-06-16 Thread Kalyani Phadke
I am using sqlite version 3.6.15.I upgraded my database from sqlite 3.5.4 to 3.6.15. I am not able to open database from sqlite3.exe cmd utility . I can do sqlite3.exe test.DB but if type .database ,it gives me error malformed database schema. pragma integrity_check , gives error malformed

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Jens Páll Hafsteinsson
Closing and opening again did not speed up steps 1-4, it actually slowed things down even more. The curve from the beginning is a bit similar to a slightly flattened log curve. When I closed the database and started the test again, a similar curve appeared again, but now starting from where the

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Konrad J Hambrick
Jeffrey -- Maybe so, but I should have looked further in Jen's reply at the built-in optimizations for DELETE on a Table without any filters and not having TRIGGERS ... sorry :( -- kjh On 06/16/2009 12:44 PM, Hoover, Jeffrey wrote: > Wouldn't a period VACUUMing of the database alleviate

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Hoover, Jeffrey
Wouldn't a period VACUUMing of the database alleviate fragmentation? - Jeff -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Konrad J Hambrick Sent: Tuesday, June 16, 2009 1:43 PM To: General Discussion of SQLite Database

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Konrad J Hambrick
Jens -- I have seen Index and Record Fragmentation cause the kind of slowdowns you are describing. Especially when there are a lot deletes followed by a 'largish' (100,000-record) batch of inserts. I have found on occasion that the speed is more consistent if I can find a way to drop and

Re: [sqlite] Question about searches

2009-06-16 Thread Simon Slavin
On 16 Jun 2009, at 4:46pm, Swithun Crowe wrote: > How about having an extra column for each column that you want to > search > in? In the extra column, have a plain lowercase ASCII version of the > word. > So, for 'Sào Paulo', have 'sao paulo'. You would need to write a small > program to

Re: [sqlite] Datatypes (D. Richard Hipp)

2009-06-16 Thread Igor Tandetnik
Fred Williams wrote: > What! The standard is lacking? Will wonders never cease? > > Thanks, you saved me from some boring reference reading. > > Still think, logically speaking, the construct should throw an error > message, rather than make stealth changes to the

Re: [sqlite] Datatypes (D. Richard Hipp)

2009-06-16 Thread Simon Slavin
On 16 Jun 2009, at 5:32pm, Fred Williams wrote: > Still think, logically speaking, the construct should throw an error > message, rather than make stealth changes to the expected result. I suppose it might be possible to provide SQLite with a 'conform to standard' mode you could select using

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Simon Slavin
On 16 Jun 2009, at 4:31pm, Konrad J Hambrick wrote: > Is there a way to replace step 5 (delete everything from the table) > with a System-Level rm / unlink and a sqlite CREATE TABLE ? JP can totally do that, but his original question was why the system gradually gets slower and slower. and

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread P Kishor
On Tue, Jun 16, 2009 at 10:57 AM, Jens Páll Hafsteinsson wrote: > The key factor here is not the total time taken to perform these operations > but the fact that the time is *increasing* for each run. I am looking for > consistency in that I need to be able to let the

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Simon Slavin
On 16 Jun 2009, at 1:06pm, Jens Páll Hafsteinsson wrote: > 1. start a transaction > > 2. insert 1000 records > > 3. commit > > 4. repeat steps 1-3 100 times > > 5. delete everything from the table > > 6. Start again at step 1 Okay, so do that until it's slow,

Re: [sqlite] Datatypes (D. Richard Hipp)

2009-06-16 Thread Fred Williams
What! The standard is lacking? Will wonders never cease? Thanks, you saved me from some boring reference reading. Still think, logically speaking, the construct should throw an error message, rather than make stealth changes to the expected result. Fred -Original Message- From:

Re: [sqlite] Datatypes (D. Richard Hipp)

2009-06-16 Thread Fred Williams
Is this a violation of SQL Standards? Seems like it should be. I'm not for dumbing down the system to compensate for the occasional idiot programmer. After all, we are not the government, nor should we strive to act like it (IMHO). If someone chooses to attempt to create a

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Jens Páll Hafsteinsson
The key factor here is not the total time taken to perform these operations but the fact that the time is *increasing* for each run. I am looking for consistency in that I need to be able to let the application perform these steps in constant time over a long period of time (months). Dropping

Re: [sqlite] Datatypes (D. Richard Hipp)

2009-06-16 Thread Igor Tandetnik
Fred Williams wrote: > Is this a violation of SQL Standards? Seems like it should be. As far as I can tell, CREATE TABLE AS SELECT is not part of SQL92 standard at all. If you want to work within the standard, don't use this construct in the first place. Igor

Re: [sqlite] Rather SQL quiestion

2009-06-16 Thread Boris Ioffe
Thank you Pavel for the lesson. I learned to never underestimate the power of self join. Works :) --- On Tue, 6/16/09, Pavel Ivanov wrote: > From: Pavel Ivanov > Subject: Re: [sqlite] Rather SQL quiestion > To: "General Discussion of SQLite

Re: [sqlite] Question about searches

2009-06-16 Thread Igor Tandetnik
Christophe Leske wrote: >> You write your own comparison function that would consider these two >> strings equal. See sqlite3_create_function, sqlite3_create_collation. >> > this problem pertains not only to Zürich, but to 24000 other entries, > so > I guess that this is no

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Jens Páll Hafsteinsson
Thanks for the pointers Kees. I'll keep those in mind when I go into trying to optimize the database. I was clearly way off track when I said I was perfectly aware of the issues concerning the database. I completely forgot about taking the spin factor into account as you and Jim have pointed

Re: [sqlite] Datatypes (D. Richard Hipp)

2009-06-16 Thread Fred Williams
Is this a violation of SQL Standards? Seems like it should be. I'm not for dumbing down the system to compensate for the occasional idiot programmer. After all, we are not the government, nor should we strive to act like it (IMHO). If someone chooses to attempt to create a

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Jens Páll Hafsteinsson
Ah, of course. Thanks for the explanation Jim. JP -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jim Wilcoxson Sent: 16. júní 2009 15:07 To: General Discussion of SQLite Database Subject: Re: [sqlite] Database inserts

Re: [sqlite] Rather SQL quiestion

2009-06-16 Thread Pavel Ivanov
Try this: select c.* from players a, registrations b, players c where a.device_id = b.device_id and b.mesg_token='123456' and a.table_group_id = c.table_group_id and a.table_id = c.table_id Pavel On Tue, Jun 16, 2009 at 11:25 AM, Boris Ioffe wrote: > > Hello

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Konrad J Hambrick
Hmmm ... Is there a way to replace step 5 (delete everything from the table) with a System-Level rm / unlink and a sqlite CREATE TABLE ? -- kjh On 06/16/2009 10:06 AM, Jim Wilcoxson wrote: > You are doing transactions here, which is a very different thing from > normal disk I/O. Your CPU is

[sqlite] Rather SQL quiestion

2009-06-16 Thread Boris Ioffe
Hello folks, I am having trouble understanding one very important concept about IN operator. Let me show you my situation below. sqlite> select sqlite_version(); sqlite_version() 3.3.6 * Here is my table schema CREATE

Re: [sqlite] Question about searches

2009-06-16 Thread Christophe Leske
> You write your own comparison function that would consider these two > strings equal. See sqlite3_create_function, sqlite3_create_collation. > Well, this problem pertains not only to Zürich, but to 24000 other entries, so I guess that this is no option for me. And again, I am using the

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Kees Nuyt
On Tue, 16 Jun 2009 14:23:47 +, Jens Páll Hafsteinsson wrote: > Yes, I'm perfectly aware of this and hence I > would expect the disk to be sweating like hell > running this test while the CPU is relatively > relaxed (given that sqlite is disk bound in > this case and not

Re: [sqlite] Question about searches

2009-06-16 Thread Igor Tandetnik
Christophe Leske wrote: > - how can SQlite be instructed to return search results which include > a > special character in it? > E.g. you search literally for "Zurich" on an englisch system and > expect > "Zürich" to be in the result set. You write your own comparison

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Jim Wilcoxson
You are doing transactions here, which is a very different thing from normal disk I/O. Your CPU is idle because it is waiting for the disk. Your disk is idle because it is waiting for the platters to rotate around again. The best case you can achieve on a 7200RPM disk is 120 transactions

Re: [sqlite] Datatypes (D. Richard Hipp)

2009-06-16 Thread D. Richard Hipp
> > > Ok, I can see this. But I cannot forsee the real implications > though. If I > have a statement like > > create table mytable(pnumber integer, name varchar(20), primary > key(pnumber)) > > what are the reported datatypes? still integer and varchar(20)? Yes. But if you do CREATE

Re: [sqlite] Datatypes (D. Richard Hipp)

2009-06-16 Thread A Drent
On Jun 16, 2009, at 8:47 AM, A Drent wrote: > > From the docs I read that for the new version: > > a.. When new tables are created using CREATE TABLE ... AS SELECT ... > the > datatype of the columns is the simplified SQLite datatype (TEXT, > INT, REAL, > NUMERIC, or BLOB) instead of a copy of the

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Jens Páll Hafsteinsson
Yes, I'm perfectly aware of this and hence I would expect the disk to be sweating like hell running this test while the CPU is relatively relaxed (given that sqlite is disk bound in this case and not CPU bound). But this is not happening; neither the disk nor the CPU are practically doing

[sqlite] Question about searches

2009-06-16 Thread Christophe Leske
Hi there, i have written an application which runs under german and englisch versions of Windows. It includes a city databases which is ought to be searchable, yet there are a couple of issues which are of more logical nature... My shell application surrounding the sqlite database only

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Adam DeVita
Remember the implications of Moore's law and how much time has passed. CPU speed is much faster than memory speed. Memory speed is much faster than disk access. This is why hardware folks play all sorts of tricks with pipelines, caches, interleaving, and parallelism. For a single process that

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Jens Páll Hafsteinsson
In step 5 I execute "delete from t1" without any where clause. I haven't monitored the disk space used (does sqlite use temporary files beside the database file?) but the database file itself has been fixed in size at around 12MB (12.461.056 bytes) the whole time. The load on the disk is

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Jens Páll Hafsteinsson
No, but I downloaded 3.6.15 and am running it through the test now. Will let you know the results. JP -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of hiral Sent: 16. júní 2009 12:10 To: General Discussion of SQLite Database

Re: [sqlite] Datatypes

2009-06-16 Thread D. Richard Hipp
On Jun 16, 2009, at 8:47 AM, A Drent wrote: > > From the docs I read that for the new version: > > a.. When new tables are created using CREATE TABLE ... AS SELECT ... > the > datatype of the columns is the simplified SQLite datatype (TEXT, > INT, REAL, > NUMERIC, or BLOB) instead of a copy

Re: [sqlite] Datatypes

2009-06-16 Thread John Machin
On 16/06/2009 10:47 PM, A Drent wrote: > Sorry, something went wrong on the previous post. *AND* on this one; you are starting a new topic but you included about 900 lines from today's digest!! >>From the docs I read that for the new version: > > a.. When new tables are created using CREATE

Re: [sqlite] Datatypes

2009-06-16 Thread Igor Tandetnik
A Drent wrote: > a.. When new tables are created using CREATE TABLE ... AS SELECT ... > the datatype of the columns is the simplified SQLite datatype (TEXT, > INT, REAL, NUMERIC, or BLOB) instead of a copy of the original > datatype from the source table. > > I don't know why this has been done

[sqlite] Datatypes

2009-06-16 Thread A Drent
Sorry, something went wrong on the previous post. >From the docs I read that for the new version: a.. When new tables are created using CREATE TABLE ... AS SELECT ... the datatype of the columns is the simplified SQLite datatype (TEXT, INT, REAL, NUMERIC, or BLOB) instead of a copy of the

[sqlite] Datatypes

2009-06-16 Thread A Drent
>From the new version I read: - Original Message - From: To: Sent: Tuesday, June 16, 2009 2:00 PM Subject: sqlite-users Digest, Vol 18, Issue 62 > Send sqlite-users mailing list submissions to > sqlite-users@sqlite.org > > To

Re: [sqlite] SQlite3 - SQL injection using ruby

2009-06-16 Thread John Elrick
dave lilley wrote: > Many thanks to all who have replied, > > I know understand the difference and shall use that approach to creating my > queries. > > regarding the "ruby way" it was more how I saw saving code typing by > injection different table, field and user data into one query thus saving

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Pavel Ivanov
How do you do step 5? Like "delete from table" or "delete from table where ..."? Do you see any degrade in disk space used by database along with slowness? Pavel On Tue, Jun 16, 2009 at 8:06 AM, Jens Páll Hafsteinsson wrote: > Hi > > I've been running some tests against sqlite

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread hiral
Sorry I got it. Did you tried with 3.6.14.2. Thank you. -Hiral On Tue, Jun 16, 2009 at 5:39 PM, hiral wrote: > Hi, > > Can you please let me know which version of sqlite, are you using? > > Thank you. > -Hiral > > On Tue, Jun 16, 2009 at 5:36 PM, Jens Páll

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread hiral
Hi, Can you please let me know which version of sqlite, are you using? Thank you. -Hiral On Tue, Jun 16, 2009 at 5:36 PM, Jens Páll Hafsteinsson wrote: > Hi > > I've been running some tests against sqlite and have found that inserts are > gradually slowing down. Since I'm

[sqlite] Database inserts gradually slowing down

2009-06-16 Thread Jens Páll Hafsteinsson
Hi I've been running some tests against sqlite and have found that inserts are gradually slowing down. Since I'm new to sqlite I might be doing something wrong and thought I'd ask here if anyone has seen this before or know what might be causing this. The test I'm running creates a database

[sqlite] Sqlite-3.5.9: getting sqlite_autoindex error

2009-06-16 Thread h o
Hi, I am using sqlite-3.5.9 and observing a 'disk image malformed' error nfs, on doing 'PRAGMA integrity_check' I got following messages... SQLite version 3.5.9 Enter ".help" for instructions sqlite> PRAGMA integrity_check; *** in database main *** Page 5275 is never used wrong # of entries in

[sqlite] Bug in retrieving last rowid?

2009-06-16 Thread hartwig . wiesmann
I have created Tables A & AS_FTS "create table A (id integer primary key, string Text);" "create virtual table AS_FTS (Name);" and a trigger "insert into A_FTS (rowid,Name) values (New.%@,New.%@);" (and a not shown delete trigger). Now, I enter two strings into tue table: one and two. I

Re: [sqlite] SQlite3 - SQL injection using ruby

2009-06-16 Thread dave lilley
Many thanks to all who have replied, I know understand the difference and shall use that approach to creating my queries. regarding the "ruby way" it was more how I saw saving code typing by injection different table, field and user data into one query thus saving typing. BUT in the interests