Re: [sqlite] Uncached performance

2015-01-08 Thread Donald Griggs
Hi, Maksim, Others with more knowledge than I have given great advice regarding placing your blob as the *last* table column, and about looking at cache size and page size. I wondered about three things: 1) Might there be further performance gains by placing the blobs in a separate table?

Re: [sqlite] sqlite3 performance on select count very slow for 16 GB file

2015-01-25 Thread Donald Griggs
'd want to compare using about the same cache I would think. (A large cache alone does NOT substitute for one of the "fast row count" solutions above, but it might make a big difference in your other operations.) https://www.sqlite.org/pragma.html#pragm

Re: [sqlite] Converting *.sqlite3 files

2015-01-27 Thread Donald Griggs
Hi, Luke, It's possible you'll want to enlist a friend who has some familiarity with databases and utilities. to help you out, since the data you're after may not be stored into a single table (like a spreadsheet). I don't know enough about your needs and your experience to say. That being

[sqlite] Did A Recent Windows & Update Affect SQLite???

2015-04-01 Thread Donald Griggs
Regarding: "... would love to see the SQLite schema Lightroom uses" Hi, Rob I am not a user of Lightroom, but there's a start at this link: http://www.earthboundlight.com/phototips/querying-sqlite-lightroom-database.html

[sqlite] Destroy all evidence of a database

2015-04-22 Thread Donald Griggs
Regarding: ...A nice attack against encrypted SQLite databases might be to crash a SQLite application while it's processing and examine any journal files, shared memory file and temporary index files. It might be interesting to review the various encryption systems widely available for SQLite

[sqlite] Site unavailable.

2015-08-11 Thread Donald Griggs
(No problem as of this writing from southeastern usa.) You might want to try a traceroute. There are two additional mirrors you can try. http://www.sqlite.org/cgi/src (Dallas) http://www2.sqlite.org/cgi/src (Newark) http://www3.sqlite.org/cgi/src (Fremont) On Tue, Aug 11, 2015 at 7:51 PM,

[sqlite] Partial indexes not working for me

2015-01-29 Thread Donald Griggs
Filip, I don't suppose it would fit your needs to index on the column you're comparing rather than on "id" would it? That would cause the query planner to use your indexes, I believe. create index "i1" on "t" (uniqueID) where UniqueId ==55; Alternatively, you can create an

[sqlite] Fwd: Usenix paper: Korean researchers invent sqlite WALDIO mode to circumvent redundant journaling by EXT4 on eMMC

2015-07-13 Thread Donald Griggs
There's an interesting paper at https://www.usenix.org/system/files/conference/atc15/atc15-paper-lee-wongun.pdf I don't know enough to evaluate it, but if I'm understanding correctly: -- They have modified sqlite so as to work directly with the EXT4 filesystem to prevent redundant journaling

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Donald Griggs
Jason, I think your problem description is too abbreviated to allow anyone to easily reproduce it. Maybe you can repost with a minimal example of the failure, but include a full script that will show the problem, and let us know what version of the sqlite3 commandline utility was used and what

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Donald Griggs
Jason, I downloaded your database and copied the SELECT from your original post. sqlite> select * from PatientTreatmentNote ptn join PatientTreatmentNoteStep pts ON pts.TreatmentNoteID = ptn.TreatmentNoteID ; Error: no such table: PatientTreatmentNote (note that this was because table name

[sqlite] SQLite (1.0.97) access via LAN

2015-06-19 Thread Donald Griggs
Hello, Takashi, Jean C. actually addressed your question, but I'm writing just to be sure you're aware that opening a sqlite database across a network is problematic and might corrupt your database -- even if it appears to work during testing. https://www.sqlite.org/howtocorrupt.html

[sqlite] Weird (slow) TEMP B-TREE ORDER BY

2015-03-10 Thread Donald Griggs
Hi, Dinu, I'll have to leave it to those more knowledgeable to respond to other aspects of your question, but I was struck by the following. 1) Regarding columns such as "provider TEXT(20)" Do you really mean that values in such columns might need to contain up to two giga-characters (2

Re: [sqlite] SqliteDog released

2013-10-23 Thread Donald Griggs
Congratulations to the team! Just a note in the spirit of helpfulness: Note that one of the major headings on the website is misspelled "Purhase."There are numerous grammar errors in the website text. I suggest you may want to have a native English speaker proof it. On Wed, Oct 23,

Re: [sqlite] Need advice on using nested selects in JOIN statements as a logical 'AND'

2013-11-30 Thread Donald Griggs
Tristan, My apologies to you and the list if you mentioned this earlier, but I assume you've run the analyze command on your database, right? http://www.sqlite.org/lang_analyze.html Also possibly relevant: http://www.sqlite.org/compile.html#enable_stat3 (Of course, Igor's suggestion of the

Re: [sqlite] Free Page Data usage

2014-02-07 Thread Donald Griggs
Can you write more about how this is causing you a problem? Most users don't experience this as a problem On Feb 7, 2014 10:30 AM, "Raheel Gupta" wrote: > > > > SQLite's tables are B-trees, sorted by the rowid. Your new data will > > probably get an autoincremented rowid,

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Donald Griggs
On Mon, Feb 17, 2014 at 6:37 AM, Tim Streater wrote: > If I have a text column defined as it might be as MYCOL TEXT (that is with > no default value), is there a way to distinguish in some row or other > between a column into which no data has ever been entered, and a

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Donald Griggs
Hi Patrick, Am I right that fractional exposures will always have one as the numerator? I.e., you might record an exposure as "1.5" seconds, but never as "3/2" seconds? If so, then that might simplify things. The example below creates a column named "canon" to hold the canonical exposure

Re: [sqlite] Join of two virtual tables returns incorrect result set in 3.8.4.1

2014-04-02 Thread Donald Griggs
Attachments can't appear on this list. You can use a shared file service and post a link, or for smallish amounts of text use something like pastbin.com. On Wed, Apr 2, 2014 at 6:42 PM, Andy Goth wrote: > On 4/2/2014 4:52 PM, Hinrichsen, John wrote: > >> sqlite

Re: [sqlite] Establishing a connection and downloading tables from an SQLite server

2014-04-05 Thread Donald Griggs
Greetings, Armondo. Would a simple script invoking the Sqlite3 commandline interface programdo what you want? http://sqlite.org/sqlite.html sqlite3 wrote: > To whom it may concern: > > I am absolutely new to to the world of SQLite (and SQL in general, to be

Re: [sqlite] field length retreval

2014-04-18 Thread Donald Griggs
I know very little about Postgres, but I see this interesting page in their documentation: http://www.postgresql.org/docs/8.0/interactive/datatype-character.html Excerpt: *An attempt to store a longer string into a column of these types will result in an error, unless the excess characters are

Re: [sqlite] Long table fails to create with exec sql on windows 8.1

2014-04-24 Thread Donald Griggs
fyi, when I run it from sqlite3.exe on windows I get: Error: duplicate column name: SubrouteNumber You're checking returned error codes, right? > ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Getting error "file is encrypted or is not a database" when trying simple C example

2014-05-26 Thread Donald Griggs
Hi Fred, At the risk of informing you of something you may already know, you should be able to convert an sqlite version 2 database to sqlite3 easily using the command line commands as follows: sqlite OLD.DB .dump | sqlite3 NEW.DB http://www.sqlite.org/version3.html Donald

Re: [sqlite] Creating fiels

2014-07-18 Thread Donald Griggs
Regarding "But how can I define the time of variable in the fields since it assumes all of them are TEXT?" In case you are asking about how to manipulate date and/or time data, see: http://www.sqlite.org/lang_datefunc.html Regards, Donald ___

Re: [sqlite] How to determine player's leaderboard rank efficiently?

2014-08-26 Thread Donald Griggs
> > > Regarding: > > WITH RECURSIVE >x(y) AS (VALUES(1) UNION ALL SELECT y+1 FROM x WHERE y<1000) > INSERT INTO player SELECT printf('Player%d',i), i, random(), NULL FROM x; > > > If anyone's "playing along at home" I wondered if instead of: ... printf('Player%d',i), i,

[sqlite] just fyi: iPhone and iPad 3G's tracking their owners' movements and saving to sqlite db

2011-04-20 Thread Donald Griggs
The video mentions that the file "consolidated.db" is an ordinary sqlite file, containing latitude, longitude, and timestamps. The data they examined went back several months. http://radar.oreilly.com/2011/04/apple-location-tracking.html There's no allegation the data is *transmitted* to Apple

Re: [sqlite] just fyi: iPhone and iPad 3G's tracking their owners' movements and saving to sqlite db

2011-04-20 Thread Donald Griggs
Re: *SQLite is not really related to this* I wasn't really posing an issue for the list, just an fyi, such as is often done when an sqlite application is in the news. Re: *...as is almost all database-suitable data in an iPhone.* Didn't realize it was so extensive in the iPhone.

Re: [sqlite] Conversion of SQLite Database to MySql format

2011-10-05 Thread Donald Griggs
Hello, Alberto, Simon's initial reply was full of helpful facts, but I'm thinking he might have misread and you are asking about conversion in the opposite direction: I.e., from an sqlite database into a MySQL database (or perhaps just into MySQL-compatible text statements to perform an

Re: [sqlite] UPDATE question

2011-10-18 Thread Donald Griggs
Hi, Barry, Regarding: "Could you please explain me why the indexing is so important? (for future reference)." If you're asking just in *general* why indexes can speed up searching a database table, you might want to look at most any sql tutorial, or resources such as:

Re: [sqlite] Inserting Multiple Rows in a single statement

2011-11-29 Thread Donald Griggs
Sreekumar, Regarding: > > Is it possible to insert multiple rows using a single statement ? > You might want to let us know your reasons for requesting this. If it's speed of insertion you're after, then be sure to put many INSERT's into each transaction. That is, be sure to surround a batch

Re: [sqlite] Database Diagram

2011-12-06 Thread Donald Griggs
Regarding: > > Hello i want to know how to get the database diagram from sqlite.Please > tell > me the solution.Thanks in Advance. > > Quick answer: The sqlite3 utility, linked from the sqlite.org website, can dump schema with the .schema command. If you need more than this, you will

[sqlite] version 3.9.0 doc errors

2015-10-08 Thread Donald Griggs
Regarding: 2nd paragraph - The New Version Numbering System (auxiliary letter): "The second number Y is incremented for any change that breaks forward*s* compatibility..." Not that it matters much, but in general it seems that adding the "s" to backward and forward is more often done in British

[sqlite] SQLITE_NULL values on column of migrated DB

2015-10-31 Thread Donald Griggs
Hi, Andi, I imagine this doesn't fully solve your problem, but I noted that: 1. Your example database does NOTt pass PRAGMA INTEGRITY_CHECK; When using 3.9.1 command line utility. 2. Using 3.8.10.2, it DOES pass. 3. I can use ".dump" under 3.8.10.2, to produce a text sql file, then,

[sqlite] How to read data from WAL?

2016-03-08 Thread Donald Griggs
Sairam, Just in case it's useful and you've not see it, Simon Slavin pointed out this "rqlite" project for replicated sqlite in an email from 25 Feb. Donald Simon Slavin slavins at bigfraud.org via

Re: [sqlite] [BUG] 1200x slow-down running query in 3.7.3

2010-10-20 Thread Donald Griggs
On Mon, Oct 18, 2010 at 9:18 AM, Peter wrote: > I have a query which takes 17 minutes to run with 3.7.3 against 800ms > with 3.7.2 > > The query is: > > SELECT x.sheep_no, x.registering_flock, x.date_of_registration > FROM sheep x LEFT JOIN > Regarding: "Turning

Re: [sqlite] What is the easiest way of changing the field type?

2012-12-02 Thread Donald Griggs
Regarding: *How do I do that? I thought that simply using ".backup/.restore" will give me what I want, but it gives me a file in internal format. What I am trying to do is do make a text file which gives me all SQL command that was issued (CREATE TABLE and INSERT) than fix the particular CREATE

Re: [sqlite] What is the easiest way of changing the field type?

2012-12-02 Thread Donald Griggs
Regarding: > > > > Note that you only need to .dump/.read the table(s) you want to alter. > > *Well, I don't think it's true. > 1. When I execute "CREATE TABLE" with the table name that already exists > wouldn't I get an error message? > 2. If I drop this table first I will get an error about the

Re: [sqlite] Lock Database temporarily.

2013-01-08 Thread Donald Griggs
Regarding:*...and I require to lock the database **from any third party modification.* I know you wrote "modification," but I wondered if you have : a) a requirement to prevent even *reading* of the database by outsider programs. b) a requirement to ALLOW *reading* of the database by

Re: [sqlite] import TXT file

2013-02-21 Thread Donald Griggs
Hi, Gert, Regarding: - the import is not done line per line Could you elaborate on what you mean by this? FYI, the separator can be a string of characters, if you need something highly unlikely to occur in the data, something like !@# for example. Are the import errors repeatable? I.e. does

Re: [sqlite] Bug or some misunderstanding?

2013-04-03 Thread Donald Griggs
this helps, Donald Griggs On Tue, Apr 2, 2013 at 7:54 PM, Support <apps...@gmail.com> wrote: > Hi > I have a database which has an entry "USE" in a table called airports with > column LocationID. > When I call > sqlite3 -line ~/Desktop/maps.db 'select * from airp

Re: [sqlite] Getting Started with Sqlite

2013-05-22 Thread Donald Griggs
Regarding: Either way when I open the shell it gives me a sqlite> prompt, not sqlite3> Yes, I suspect Igor intended sqlite> But to his larger point, am I close to correct in replicating your error below? I strongly suspect you're typing "sqlite3" when you are already inside

Re: [sqlite] Serialize an in-memory database

2013-06-06 Thread Donald Griggs
Hi Philip, Maybe neither of these two thoughts are helpful, but fyi: 1.* Licensing for existing memory vfs.* Regarding this memory vfs implementation referenced earlier: http://article.gmane.org/gmane.comp.db.sqlite.general/46450

Re: [sqlite] How to interrupt a long running update without roll back?

2013-06-23 Thread Donald Griggs
Regarding: ...then went horribly wrong at some point after rowids consumed all of 32 bits... If your application treated ROWIDs as 32-bit integers, that may possibly have been the cause of your problem, since ROWID's are 64-bit integers. The maximum ROWID is 9223372036854775807

Re: [sqlite] SQLite port to RTOS

2013-09-03 Thread Donald Griggs
I do *not* know if Tripathi was involved in the *porting* of sqlite to iTron, or just its use with iTron. If you get no response from the developer list, it may just be that no one there has experience with ulTron RTOS. Best of luck, Donald Griggs On Tue, Sep 3, 2013 at 8:06 AM, John

Re: [sqlite] freelist_count - can it shrink back?

2012-02-13 Thread Donald Griggs
Regarding: My question is, when I insert new data, is the needed space allocated out > of the free_list or do the db file grows larger and the free space stays > till vacuum operation is performed? > Basically, my question is: on intensive inserts and deletes will the freed > space be re-used ? >

Re: [sqlite] Details on New Features

2012-05-06 Thread Donald Griggs
Regarding: What precisely are the "improvements" in handling of CSV inputs? Gabor, I don't know about "precisely" -- I'll let others on the list tell me where I'm off, but here's my take: A lot of strange things call themselves csv, but the change attempts to make the sqlite3 utility's CSV

Re: [sqlite] how to write "\n\r" each line in the output txt file?

2012-05-16 Thread Donald Griggs
On Wed, May 16, 2012 at 9:30 PM, YAN HONG YE wrote: > > > >when I use : > > > >.output akk.txt > >select * from dhq where qph>0; > >.output stdout > > > > command to write a txt file,I found no "\n\r" in the each line, > > when I use ultraedit to open the txt file, I found

Re: [sqlite] csv test cases (was Details On New Features)

2012-05-23 Thread Donald Griggs
-- Regarding: * I have a question about #9 of your test cases. According to RFC 4180, #9 is an invalid record. The RFC states "If fields are not enclosed with double quotes, then double quotes may not appear inside the fields."* My example #9 was: 9,imperial ("laughing") loon I'm no

Re: [sqlite] SQL error: unrecognized token: "!!"

2012-06-13 Thread Donald Griggs
Hi Alex, Welcome to sqlite. Regarding: sqlite> INSERT INTO 'gb' VALUES ('Die Alex','http://','Heisann Jungs! \n\nIch drück euch alle meine Daumen für's finale!! Ihr schafft das!! \n\n','193.216.173.35','2007- > > 11-05 20:00:20',NULL); > ...> ; > ...> ; > ...> ' > ...> ; > SQL error:

Re: [sqlite] An interesting (strange) issue with selects

2012-06-29 Thread Donald Griggs
Regarding: > Could it be that the .ext is used by the OS or other apps with some > caching scheme? Well, this symptom is so amazingly strange, it undeniably belongs in the Ext Files. (To those outside the U.S -- this is just a joke on http://en.wikipedia.org/wiki/The_X-Files )

Re: [sqlite] Error: datatype mismatch

2012-07-16 Thread Donald Griggs
On Mon, Jul 16, 2012 at 3:30 AM, YAN HONG YE wrote: > the table is: > CREATE TABLE webinfo (inx INTEGER PRIMARY KEY ,website varchar(50) > UNIQUE,userna > me varchar(50),password varchar(50)); > > and the txt file kk.txt is utf8: > 0,nytime,gf,a1..7 > 1,bbc,1982,tbth432 >

Re: [sqlite] Many tables in one database

2012-07-20 Thread Donald Griggs
Arbol One wrote: > Using SQLite3.7.8 amalgamation and C++, I would like to create a database > with several joined tables. Can SQLite3 have many tables in one database? > > I'm perhaps not understanding your question. -- If you mean "Can a sqlite

Re: [sqlite] database AND table already exist?

2012-07-20 Thread Donald Griggs
On Fri, Jul 20, 2012 at 6:51 AM, Arbol One wrote: > Is there a way to find out if a certain database AND table already exist? > > I am using std i/o methods to check for the existing SQLite3 file > containing the database, ==> I think that's the standard method. but I

Re: [sqlite] database AND table already exist?

2012-07-20 Thread Donald Griggs
Darn. I didn't mean to quote the table name: (though double quotes or brackets are alllowed). Sorry for the noise. SELECT 'anything' FROM MyTableInQuestion LIMIT 0; ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Help Installing SQLite on a Windows 8.1 PC

2016-07-07 Thread Donald Griggs
Hi Krista, Regarding: I have downloaded the two 64-bit Windows files on my Windows 8.1 PC, Are you referring to sqlite.exe and maybe sqlite.dll ? Regarding: but I cannot get SQLite to install on my PC. I'm not sure I understand you. Maybe you could rewrite this in form of something

Re: [sqlite] New tool for PUTTY logging [Windows]

2017-02-02 Thread Donald Griggs
Maybe another method to consider: This guy shows that Putty appears to support creating separate log files for each session including a timestamp in the file name. https://www.viktorious.nl/2013/01/14/putty-log-all-session-output/ Could your script import any new log files it sees, then move

Re: [sqlite] Does SQLite use field definitions?

2017-02-01 Thread Donald Griggs
The default maximum string length is one billion (10 ** 9). You can configure the maximum up to about twice that. https://www.sqlite.org/limits.html If column affinity matters in your application, you may want to declare your column as TEXT or maybe CLOB (identical effect.)

Re: [sqlite] "Responsive" website revamp at www.sqlite.org

2016-09-05 Thread Donald Griggs
At first blush, looks good on my Zenfone 2 under android 5.0 with chrome and on laptop with Windoze 10 and chrome. In the interest of "dotting all the i's" I noted a misspelling in the initial sentence: "SQLite is a high-reliablity," for reliability.

Re: [sqlite] VACUUM causes Out of memory error

2016-11-02 Thread Donald Griggs
Stephan, I don't have the skills to fix your difficulty, but FWIW, I did reproduce your symptom using the database you provided in case that helps others diagnose it properly. I used: -- SQLite version 3.15.0 -- official command line utility -- Windows 7 -- 16GB installed ram, plenty of hard

Re: [sqlite] sqlite3_changes() using 64 bit counters?

2016-12-08 Thread Donald Griggs
Just curious -- some of your tables approach 2 billion (2 milliard) rows? Or, more precisely, you operate on more than 2 billion rows in a single transaction? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Why this query plan?

2017-01-12 Thread Donald Griggs
Re: "I read this as a provocative joke." I didn't read it as just a joke. The analogy with random fonts, etc. breaks down, I think, because randomizing the ordering would be an attempt to *improve* sqlite's usability -- not some pedantic punishment. If a user has problems with her sqlite output

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-05 Thread Donald Griggs
On Thu, Jan 5, 2017 at 2:26 PM, Smith, Randall wrote: > "I'm still trying to figure out a graceful way..." I may well just be missing something important, but would the following not be simple, unclunky, and not highly error-prone? 1) Before your program closes:

Re: [sqlite] SQLite 3.16.0 enters testing

2016-12-29 Thread Donald Griggs
any rate, but I suspect should be "are stored." http://www.quickanddirtytips.com/education/grammar/compound-subjects ) On Thu, Dec 29, 2016 at 2:17 PM, Donald Griggs <dfgri...@gmail.com> wrote: > Tiny typo in docs: > > Page: https://www.sqlite.org/draft/imposter.html > >

Re: [sqlite] SQLite 3.16.0 enters testing

2016-12-29 Thread Donald Griggs
Tiny typo in docs: Page: https://www.sqlite.org/draft/imposter.html "This will not cause any immediately problems" (remove "ly") > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] count registers in a table

2016-12-26 Thread Donald Griggs
Hello, Hugo, Regarding: "I have a table with 726.000 registers." 1) I assume that you mean what others call "rows" correct? (and not columns, I hope) 2) Regarding: "SELECT COUNT(*) FROM MyTable << is very slowly" As I understand it, that should be as fast as SELECT COUNT (RowId) as of

Re: [sqlite] A CTE to count the records (rows) for each table

2017-03-15 Thread Donald Griggs
> > Does anyone knows a Common Table Expression (CTE) to be used with the > > sqlite_master table so we can count for each table how many rows it > > has. I wonder if it's always accurate to piggyback on the work of ANALYZE and obtain row counts as of the last ANALYZE via: select tbl,

Re: [sqlite] Why isn't my time formatting working?

2017-03-08 Thread Donald Griggs
Hi Rob, The format string of '%d/%m/%Y %H:%M:%S' describes what you want as output, not what you're supplying as input. You can use substr() and concatenation || to mash up your original string into the ISO format (which is much easier to handle anyway.)

Re: [sqlite] Where is the official document for System.Data.SQLite?

2017-03-13 Thread Donald Griggs
On Mon, Mar 13, 2017 at 1:44 PM, Rob Richardson wrote: > Where is the official document for System.Data.SQLite? And is there a > better list than this one to ask questions about System.Data.SQlite? Hi Rob, I don't use system.data.sqlite, but I believe you'll find

Re: [sqlite] Sqlite + Dropbox

2017-04-07 Thread Donald Griggs
On Fri, Apr 7, 2017 at 10:18 AM, Simon Slavin wrote: > Dropbox copies an entire file every time a part of it is updated. Dropbox claims that it performs difference determination, even on binary files. Of course, that would not reduce the other problems listed in this

Re: [sqlite] group_concat() reverses order given where clause?

2017-08-15 Thread Donald Griggs
Regarding: "The ordering is entirely deterministic" When the documentation says the order is arbitrary, it doesn't mean that it's non-deterministic in some "can never be determined by humans nor Schrödingerish cats" -- it is a well-understood and very useful shorthand meaning "the order, though

[sqlite] Tiny typo in doc.

2017-05-22 Thread Donald Griggs
http://www.sqlite.org/releaselog/3_19_0.html "containing two ore more" Not a complaint, just hoping to be helpful. Donald ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Expedited vacuum tool?

2017-06-15 Thread Donald Griggs
Regarding: depreciated *temp_store_directory* pragma: It seems that setting your TEMP environment variable to the location of your temporary storage area should let you dispense with the deprecated pragma.

[sqlite] sqlite CLI scripts using ".echo on" with ".once" or ".output"

2017-09-15 Thread Donald Griggs
ut file as actual sql commands are. Thanks for a great product, Donald Griggs Columbia SC USA ===Paste following to console sqlite3 :memory: CREATE TABLE fruits( name TEXT, cnt INTEGER); INSERT INTO fruits VALUES ('apple', 1), ('pear',2 ), ('mango', 4), ('grape', 3); SELECT *

Re: [sqlite] Is there a way to perform a muti-level sort and extract of large data sets?

2017-09-27 Thread Donald Griggs
Hi Ron, It may be that increasing the sqlite cache size will substantially reduce the time for either the CREATE INDEX or the SELECT ... ORDER BY instructions (depending upon which method you choose). https://sqlite.org/pragma.html#pragma_cache_size On Wed, Sep 27, 2017 at 1:58 AM, jungle

Re: [sqlite] Recurring Dates

2017-09-27 Thread Donald Griggs
Hello Stephen, Are the nice date/time features at https://sqlite.org/lang_datefunc.html enough? For example: select date ('2016-08-01', '+1 year'); -- gives 2017-08-01 Regarding: "- using today as the base date, a date of Aug 1, 2016 with a weekly recurring date, I'd like to get Sept 2,

Re: [sqlite] Best way to develop a GUI front-end

2017-11-14 Thread Donald Griggs
Regarding: *1. Use Christian Werner's ODBC driver from Access (or Excel):* *http://www.ch-werner.de/sqliteodbc/* If you prefer an open solution to Excel or Access, you may want to pair Werner's ODBC driver with LibreOffice Base or Calc.

Re: [sqlite] How to dump all the tables into separate files?

2017-12-08 Thread Donald Griggs
For windows, I think the following would work: sqlite3 %DB% -batch "SELECT TBL_NAME FROM sqlite_master WHERE type=='table' order by tbl_name;" >%temp%\dump.tmp for /f "usebackq" %%i in (`type %temp%\dump.tmp`) do sqlite3 %DB% -batch ".mode tabs" -batch "SELECT * FROM %%i "

Re: [sqlite] www3.sqlite.org ssl certificate expired

2018-05-17 Thread Donald Griggs
At this writing, the www3.sqlite.org cert appears valid for me. A "Let's Encrypt" cert valid from Apr 14 through July 13. www.sqlite.org and www2.sqlite.org show similar valid certs. > ___ sqlite-users mailing list

Re: [sqlite] ALTER TABLE

2018-05-23 Thread Donald Griggs
David, that's a useful reminder than trigger and index NAMES are not automatically changed when the referenced table is renamed. Maybe another is that while index and trigger creation statements automatically have the referenced table name changed (at least the non-action trigger commands) by

Re: [sqlite] Sqlite delete too slow in 4 GB database

2018-06-04 Thread Donald Griggs
If you don't already do this, you'll want to be sure the large blob(s) are the *last* fields in the table definition. On Mon, Jun 4, 2018 at 8:49 AM Paul Sanderson wrote: > Have you made sure aut_ovacuum is disabled? > > pragma *auto_vacuum * = 0 > > have you got a nice large pagesize if

Re: [sqlite] insert or replace performance with self "references" column

2018-06-27 Thread Donald Griggs
On Wed, Jun 27, 2018, 7:47 PM Keith Medcalf wrote: > > If you give the parent column a proper affinity (ie, integer) do you get > "happiness making" results? > > --- > The fact that there's a Highway to Hell but only a Stairway to Heaven says > a lot about anticipated traffic volume. > > >

Re: [sqlite] SQLite 3.22.0 coming soon

2018-01-09 Thread Donald Griggs
In an attempt to be helpful, two possible typos are: https://www.sqlite.org/draft/cli.html#expert If this option is pass a non-zero argument [change pass -> passed] https://www.sqlite.org/draft/releaselog/3_22_0.html A complex result set bias the decision Maybe " A complex

Re: [sqlite] How to add a running number column to a view which generates a limited series of randomly chosen integers?

2018-01-08 Thread Donald Griggs
Regarding: select cast(round(abs(random())/9223372036854775808) as int) means I want sqlite to toss a virtual coin and return 0 or 1. It looks like a kludge but I could find neither a simpler nor clearer way of expressing this, can you? Maybe: select abs(random() % 2);

Re: [sqlite] Reducing index size

2018-07-30 Thread Donald Griggs
There's a good chance this comment won't be useful to you, Eric. Nevertheless, Any chance of relaxing your space requirement? I.e., what bad things happen if the space is not reduced? Maybe you're writing for a fixed-space embedded device, which nonetheless has space for the gigabytes

Re: [sqlite] Known Defects/Anomalies for SQLite version 3.7.13

2018-09-05 Thread Donald Griggs
Greetings, Srinath, Regarding: * We are using SQLite version 3.7.13 in our project. We need the list of known Defects/Anomalies in SQLite version 3.7.13 for validation. Could you please share the list of known Defects/Anomalies for SQLite version 3.7.13.* As to SQLite version 3.7.13

Re: [sqlite] Help getting started

2018-03-09 Thread Donald Griggs
Hi Larry, Since you mention sqlite3.exe, I assume you're on Windows. Kudos for compiling your own exe, but if, in future, you find you don't need special compile features, you can always download the current version exe from http://sqlite.org/download.html . If I understand you correctly,

Re: [sqlite] How to convert a datetime column to a date?

2018-03-22 Thread Donald Griggs
Hello, Ron, Regarding just these two sentences: I had assumed the value was being treated as a datetime, but it looks like it may be treated as a string? I'm a bit confused because the column definition sais "datetime", not "varchar", ... The info on this page is very important,

Re: [sqlite] importing a large TSV file

2019-04-01 Thread Donald Griggs
I believe it's also helpful to avoid creating indexes (and enforcing foreign keys) until after the import. On Mon, Apr 1, 2019 at 7:15 AM Gert Van Assche wrote: > Hi all, > > I need to create an SQLite db from a large TSV file. (30 GB) > Are there any setting I can give to the db so I can speed

[sqlite] fyi, suspected typos in documentation: https://sqlite.org/c3ref/total_changes.html

2019-02-25 Thread Donald Griggs
https://sqlite.org/c3ref/total_changes.html This the sqlite3_total_changes(D) interface only reports the number of rows that changed due to SQL statement ... Perhaps should be: [[Thus]] the sqlite3_total_changes(D) interface only reports the number of rows that changed due to [[an]] SQL

Re: [sqlite] fyi, suspected typos in documentation: https://sqlite.org/c3ref/total_changes.html

2019-02-25 Thread Donald Griggs
Re: "If you think my fix is incorrect" Heavens no, just drawing attention to it to be sure it was as you intended. FWIW, the fix looks good to me. > > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Sqlite3: create a database from file using one line command-line script

2019-02-06 Thread Donald Griggs
sqlite3 myDatabase.db ".read myCommands.sql" On Wed, Feb 6, 2019 at 3:30 PM kostasvgt wrote: > Hi, I need to run a command to create a database and populate it from a > .sql file at once from command-line, not dot-commands. > Is there any way to do this in one line? > > Thanks. >

[sqlite] problem with CLI readfile() of zero-length files.

2019-04-08 Thread Donald Griggs
On my system, it appears that, beginning with 3.27.0, attempting to use the (quite useful!) readfile() function on a *zero-length* file throws "Error: out of memory" whereas with 3.26.0, the result was set to null. (Attempting to read a *non-existent* file on either version properly results in

Re: [sqlite] readfile() enhancement request

2019-05-17 Thread Donald Griggs
Hi Tony, Regarding "The problem is the multi-line text cannot be copy-pasted directly into the command line as the first newline will terminate the command." I don't know what operating system you're using. If it's not a tiny embedded OS, I wondered if you might want to use one of the many

Re: [sqlite] readfile() enhancement request

2019-05-17 Thread Donald Griggs
Somehow I'd never noticed that. Great feature! On Fri, May 17, 2019 at 2:46 PM David Raymond wrote: > Are you on an OS with a working edit() function? > https://www.sqlite.org/cli.html#the_edit_sql_function > > In Windows using notepad I can do this for example: > > insert into t values

Re: [sqlite] SQLite4 version

2019-05-29 Thread Donald Griggs
Hello, Mittal, Do you have a particular problem that you perceive would be solved by sqlite4, and not by sqlite3, or were you simply wanting the "latest" sqlite version? > > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] SQL Features That SQLite Does Not Implement

2019-05-22 Thread Donald Griggs
Regarding: ... many basic math functions are NOT supported. (sqrt,mod,power,stdev,etc.)...I am curious why these are not available ...now reading how to build my own extensions... I'm not addressing the documentation question, but extended math functions have been available since 2010. On the

Re: [sqlite] PRAGMA reverse_unordered_selects=true results in row not being fetched

2019-05-15 Thread Donald Griggs
On Tue, May 14, 2019 at 10:18 AM Manuel Rigger wrote: > ... > > The query does not fetch a row. However, without the PRAGMA statement one > row is fetched. > It probably helps the devs to specify the version you were testing. For me, your example returns a single row of "1" in each case. I'm

Re: [sqlite] Getting the week of the month from strftime or date functions

2019-05-02 Thread Donald Griggs
Hello Jose, Regarding: "...but I need to get the week of that month based on the date." One interpretation of your question might me: Given a date "d", which, say, falls on a Wednesday, then return 1, 2, 3, 4, or 5 denoting whether d is on the 1st, 2nd, 3rd, 4th, or 5th Wednesday of that

Re: [sqlite] Proposal: SQLite on DNA

2019-07-25 Thread Donald Griggs
Yes, but it will grow on you. On Thu, Jul 25, 2019 at 4:40 PM Keith Medcalf wrote: > > Considering the write speed is measured in kb/week I don't think it will > be used for online storage anytime in the lifetime of anyone within the > spin of these electrons ... > > -- > The fact that there's

Re: [sqlite] Deterministic random sampling via SELECT

2019-11-07 Thread Donald Griggs
> > Regarding: "So far the only suggestion was "use some non-deterministic > random sampling method and store the result", but since my samples are > large and I have lots of them, this would balloon my storage by >100x and I > don't have the available storage to make that work." But Keith

Re: [sqlite] Why do these 2 updates give different results?

2019-11-13 Thread Donald Griggs
> > When dealing with ED and sildenafil, getting a NULL result disappoints > everyone. ;-) > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

  1   2   >