Re: [sqlite] Efficiency Question - Value Or Liability forIndexingof This Table?

2008-03-17 Thread Lee Crain
That search is currently in process. Lee _ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jay Sprenkle Sent: Friday, March 14, 2008 4:36 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Efficiency Question - Val

Re: [sqlite] Efficiency Question - Value Or Liability for Indexingof This Table?

2008-03-14 Thread Lee Crain
- Value Or Liability for Indexingof This Table? "Lee Crain" <[EMAIL PROTECTED]> wrote: > I am debating the performance gains to be realized, if any, by indexing a > particular table in a system implementation for which I am responsible. > You are getting way ahead of

Re: [sqlite] Efficiency Question - Value Or Liability for Indexingof This Table?

2008-03-14 Thread Lee Crain
neral Discussion of SQLite Database Subject: Re: [sqlite] Efficiency Question - Value Or Liability for Indexingof This Table? Lee Crain wrote: > > The reason I was wondering about indexing is that the indexes contain > exactly the same data as is in the table and this seemed like an

Re: [sqlite] Efficiency Question - Value Or Liability for Indexingof This Table?

2008-03-14 Thread Lee Crain
Understood. I will be writing our software to search this table by values, so it sounds like indexing to improve read access is desirable. The reason I was wondering about indexing is that the indexes contain exactly the same data as is in the table and this seemed like an unnecessary duplicati

Re: [sqlite] Efficiency Question - Value Or Liability for Indexing of This Table?

2008-03-14 Thread Lee Crain
14, 2008 1:03 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Efficiency Question - Value Or Liability for Indexing of This Table? Lee Crain wrote: > > Could improvements in search and access performance be realized by > indexing this table? Yes, if your searches a

[sqlite] Efficiency Question - Value Or Liability for Indexing of This Table?

2008-03-14 Thread Lee Crain
I am debating the performance gains to be realized, if any, by indexing a particular table in a system implementation for which I am responsible. __ This is the table creation command: CREATE TABLE CC ( [catIndex] [integer] NOT NULL, [contIndex] [integer] NOT NULL, [new] [integer] NOT N

[sqlite] Efficiency Question - Value Or Liability for Indexing of This Table?

2008-03-14 Thread Lee Crain
I am debating the performance gains to be realized, if any, by indexing a particular table in a system implementation for which I am responsible. __ This is the table creation command: CREATE TABLE CC ( [catIndex] [integer] NOT NULL, [contIndex] [integer] NOT NULL, [new] [integer] NOT N

[sqlite] Efficiency Question - Value Or Liability for Indexing of This Table?

2008-03-14 Thread Lee Crain
I am debating the performance gains to be realized, if any, by indexing a particular table in a system implementation for which I am responsible. __ This is the table creation command: CREATE TABLE CC ( [catIndex] [integer] NOT NULL, [contIndex] [integer] NOT NULL, [new] [integer] NOT N

[sqlite] Inconsistency of Returned Field Names?

2008-03-12 Thread Lee Crain
QUERY2: --- "SELECT DISTINCT [categoryIndex] FROM CategoriesContent WHERE [new] = 1 ORDER BY [categoryIndex] ASC;"; --> returns a field name of "[categoryIndex]". ______

Re: [sqlite] How to select Strict Affinity or No Affinity modes? Attention: DRH

2008-02-07 Thread Lee Crain
efit is that I have always been an adherent of strict datatyping as a means of trapping inadvertent software development errors. It's just one of the many aspects of my self-checking software that makes certain everything is done on purpose and not by chance. Lee Crain _

RE: [sqlite] How Does NOT NULL produce NULLs?

2008-01-29 Thread Lee Crain
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 29, 2008 12:39 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] How Does NOT NULL produce NULLs? "Lee Crain" <[EMAIL PROTECTED]> wrote: > I did expect SQLite to enforce the NOT NULL portion of the

RE: [sqlite] How Does NOT NULL produce NULLs?

2008-01-29 Thread Lee Crain
rce it in my source code by: if( 0 == QString.Length( ) ) { // QString object's state is ambiguous; can be NULL or empty, // according to QT documentation. QString = ""; // This line solves the problem. } Thanks for your responses, Lee Crain __ -Ori

RE: [sqlite] How Does NOT NULL produce NULLs?

2008-01-29 Thread Lee Crain
TE NOCASE ); insert into y values ('', '', ''); insert into y (description) values ('x'); select * from y; Outputs: || x|[null]|[null] Again, just what I'd expect. This under SQLite version 3.5.4. -scott On Tue, Jan 29, 2008 at 10:12 AM, Lee Crain &l

[sqlite] How Does NOT NULL produce NULLs?

2008-01-29 Thread Lee Crain
ot a NULL, only an empty string, an important distinction. How can I prevent the insertion of NULLs into these fields and instead replace them with empty strings? Lee Crain - To unsubscribe, send email to [EMAIL PROTECTED] -

RE: [sqlite] order by issue?

2008-01-23 Thread Lee Crain
Unless I don't know SQL, the results look correct. Anyone chime in to correct me. Your query: select * from tst order by b, a desc; Is really: select * from tst order by b ASC, a desc; So, if you look at the rows from top to bottom, you'll see that for each value of 'b' in ascending order, you

RE: [sqlite] How to create a database in run-time

2008-01-22 Thread Lee Crain
not yet exist, the query fails. If the Categories table already exists, the query succeeds. This solution suffices for our needs. Lee Crain __ ".my question is if there's a better solution for check if the database is already created, something like a

RE: [sqlite] SQLite --> PostGres

2008-01-11 Thread Lee Crain
em and other functionalities that are not strictly database (file cabinet) related. My only unfulfilled desire is that SQLite eventually be fully ANSI SQL '92 compliant, as a minimum. From my perspective, it is getting there. Rome wasn't built in a day. My 2 cents, Lee Crain _

RE: [sqlite] Need help in sqlite3

2008-01-08 Thread Lee Crain
something like what I've implemented, I suggest that you will most likely have to write it yourself. Lee Crain -Original Message- From: ssridhar07 [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 08, 2008 2:18 AM To: sqlite-users@sqlite.org Subject: [sqlit

RE: [sqlite] Performance tuning using PRAGMA, other methods

2007-11-20 Thread Lee Crain
Tom Brigg's response to your question 2 was an excellent response. Efficiently constructed queries will generally produce the best results. Also, indexes on fields contained in WHERE clauses will generally produce good results. Lee _ -Original Message

RE: [sqlite] Converting date from d/m/yy format

2007-11-02 Thread Lee Crain
date-time functionality must be implemented in the future, like adding or subtracting time intervals, those solutions can and should be implemented in the server software, not the server database. In my solution, the database is the repository of data, not logic.

RE: [sqlite] Converting date from d/m/yy format

2007-11-02 Thread Lee Crain
John, None of the functionalities you mentioned were requirements on the project I worked on. Clumsy? My approach simplified everything on that server and is in production worldwide, and unmodified, today. Lee Crain ___ -Original Message- From: John Stanton

RE: [sqlite] Converting date from d/m/yy format

2007-11-02 Thread Lee Crain
(but wasn't on this particular server) was the ability to add or subtract time intervals from the timestamp. You may wish to consider a similar approach to managing your date and time information. Lee Crain -Original Message- From: T&B [mailto:[EM

RE: [sqlite] Race condition -- fixed?

2007-10-25 Thread Lee Crain
ut some mysterious database problem. If my company wants something faster, they need to buy SQL Server. At $5000, it's a bargain. At my salary, I'm not. My 2 cents, Lee Crain _ -Original Message- From: Richard Klein [mailto:[EMAIL PROTECTED] Sent: We

RE: [sqlite] Re: Some Questions Regarding Access To a SQLite Database By More Than One Process

2007-10-24 Thread Lee Crain
s are executing. I think a MUTEX, even with its inherent performance limitations, is the best solution. Thanks for your replies, Lee Crain P.S. Ken, I'm pretty certain that a MUTEX is both an intra- and inter-process mutual exclusion object. -Original Message-

RE: [sqlite] Re: Some Questions Regarding Access To a SQLite Database By More Than One Process

2007-10-24 Thread Lee Crain
Igor, I did say "controlled" concurrency. I'll rephrase question 3. 3) Would use of a MUTEX to avoid the dreaded "SQLite busy" condition be a good solution? Or is some other method of avoiding a busy condition recommended? Lee Crain __ -Origina

[sqlite] Some Questions Regarding Access To a SQLite Database By More Than One Process

2007-10-24 Thread Lee Crain
pectively, each database access? 3. Would the use of a MUTEX as access protection be adequate to successfully implement controlled "concurrency"? If my ideas on how to successfully implement this capability are not appropriate, please advis

[sqlite] A Question: Use of the sqlite3_exe( ) function?

2007-10-08 Thread Lee Crain
Igor, I have a question. Why is it "highly recommended" to use the function call sequence you iterate in preference to the sqlite3_exe call, since it is implemented using that sequence? Lee Crain _ -Original Message- From: Igor Tandetnik [mai

RE: [sqlite] Bug: Database connection closed on different thread

2007-10-04 Thread Lee Crain
e next technological improvement that will make multi-threaded/parallel processing applications more robust. Lee Crain ___ -Original Message- From: Vitali Lovich [mailto:[EMAIL PROTECTED] Sent: Thursday, October 04, 2007 3:58 PM To: sqlite-users@sqlite.org Subje

RE: [sqlite] DB initial creation?

2007-09-19 Thread Lee Crain
Gary, When you execute a sqlite3_open( ) function call, the database will be created if it does not already exist. Lee Crain ___ -Original Message- From: Gary G Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 19, 2007 2:16 PM To: sqlite-users

RE: [sqlite] Callback Function Not Working In Example Code

2007-09-19 Thread Lee Crain
Gary, Your email sounds like you are executing an INSERT record command. The callback function is only called when you execute a SELECT and data is returned as a result of your query. Lee Crain ___ -Original Message- From: Gary G Allen [mailto

RE: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive

2007-08-21 Thread Lee Crain
Rich, We're going to delete and rewrite ~109,369 records in 5 tables every week. Hard drives are a minimum of 10,000 times slower than RAM. I'll let you know if this process is not a lot faster than writing the records, individually, to a hard drive.

RE: [sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive

2007-08-21 Thread Lee Crain
te database. 4. Delete the RAM drive. This technique for performing database updates offline and then updating the original database via a file copy operation has worked very well on hard drives. I am only considering using the RAM drive to improve the speed of the database upda

[sqlite] A Question About Creating and Accessing a SQLite Database in a RAM Drive

2007-08-20 Thread Lee Crain
Is there any reason why this would not be possible? Data persistence is not required. Thanks, Lee Crain - To unsubscribe, send email to [EMAIL PROTECTED] -

RE: [sqlite] Need To Export A Table From a SQLite Database as a TAB Character Delimited Text File

2007-08-14 Thread Lee Crain
Rich, I tried both of your suggestions. Both worked correctly. Thanks for the extra information, Lee Crain __ -Original Message- From: Rich Shepard [mailto:[EMAIL PROTECTED] Sent: Monday, August 13, 2007 5:29 PM To: sqlite-users@sqlite.org Subject: RE: [sqlite

RE: [sqlite] Need To Export A Table From a SQLite Database as a TAB Character Delimited Text File

2007-08-13 Thread Lee Crain
Rich, I actually keyed a TAB character, not spaces. Thanks for your response, Lee Crain ___ -Original Message- From: Rich Shepard [mailto:[EMAIL PROTECTED] Sent: Monday, August 13, 2007 4:22 PM To: sqlite-users@sqlite.org Subject: RE: [sqlite] Need To Export A

RE: [sqlite] Need To Export A Table From a SQLite Database as a TAB Character Delimited Text File

2007-08-13 Thread Lee Crain
No, I'm on Windows XP. ?? I am running SQLite 3.3.17. And I did enter exactly: separator ''; where the gap between the single quotes is an actual T A B character. Maybe that's cheating. :^) Lee Crain _ -Original Message- From: Gr

RE: [sqlite] Need To Export A Table From a SQLite Database as a TAB Character Delimited Text File

2007-08-13 Thread Lee Crain
Donald, After a small change ("" to '') for the .separator command, everything worked very well. Thanks for taking the time to respond, Lee Crain __ -Original Message- From: Griggs, Donald [mailto:[EMAIL PROT

[sqlite] Need To Export A Table From a SQLite Database as a TAB Character Delimited Text File

2007-08-13 Thread Lee Crain
I need to export a table from a SQLite database as a TAB character delimited text file. After reading the SQLite documentation, and specifically, the command line interface, I haven't found anything appropriate. Is there a way to do this from the command line interface? If so how? Thanks,

RE: [sqlite] Object Oriented Question About Adding a vector inside the callback function

2007-08-09 Thread Lee Crain
t; Field0, Field1, Field2, FieldN > vRecord3< Field0, Field1, Field2, FieldN > vRecord4< Field0, Field1, Field2, FieldN > vRecord5< Field0, Field1, Field2, FieldN > vRecord6< Field0, Field1, Field2, FieldN > vRec

RE: [sqlite] Object Oriented Question About Adding a vector inside the callback function

2007-08-09 Thread Lee Crain
OO. The breakthrough for me was to create a Field container that could hold any datatype. Now, I have an interface that is not bound to any particular tables or fields, which can receive and hold the data results from any query. Even if our underlying database changes, my SQLite API wrapper so

RE: [sqlite] UNION?

2007-08-09 Thread Lee Crain
Tom, Thanks for taking the time to document for my benefit more efficient implementations. Lee Crain __ -Original Message- From: T&B [mailto:[EMAIL PROTECTED] Sent: Thursday, August 09, 2007 4:08 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] UNION? Hi

RE: [sqlite] UNION?

2007-08-09 Thread Lee Crain
ns of the query as a representation of the problem that I had tried with MS SQL Server but not yet tried with SQLite. Lee Crain _ -Original Message- From: Jim Dodgen [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 08, 2007 7:59 PM To: sqlite-u

RE: [sqlite] Is SQLite Case Sensitive?

2007-08-08 Thread Lee Crain
m. Thanks, Lee Crain __ -Original Message- From: Dwight Ingersoll [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 08, 2007 5:11 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Is SQLite Case Sensitive? --- Lee Crain <[EMAIL PROTECTED]> wrote: >

RE: [sqlite] UNION?

2007-08-08 Thread Lee Crain
|Little Darling for V3/SP|T 106|Rose Character|T 1778|Teresa Hair|T sqlite> Further experimentation showed that the extra pair of parentheses in the first query (around each SELECT statement) caused the syntax error. Thanks for your response, Lee Crain _

RE: [sqlite] UNION?

2007-08-08 Thread Lee Crain
I've queried it in both the command line interface and via an sqlite3_exec() call in a C++ environment. Lee Crain ___ -Original Message- From: Joe Wilson [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 08, 2007 3:30 PM To: sqlite-users@sqlite.org Su

[sqlite] UNION?

2007-08-08 Thread Lee Crain
ized SQL words (http://www.sqlite.org/lang.html). Is this correct? If so, is there another way to accomplish this query as a single query? Thanks, Lee Crain __ SELECT Items.items_idx, Items.name, Items.active FROM Items WHERE active = &#x

RE: [sqlite] The Callback Function Interface?

2007-08-08 Thread Lee Crain
s for your commitment to not breaking existing interfaces. Lee Crain __ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 08, 2007 10:25 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] The Callback Function

[sqlite] The Callback Function Interface?

2007-08-08 Thread Lee Crain
John, Understood. Is the callback function interface going to be eliminated? What advantages does the new interface offer over the callback function interface? Lee Crain _ -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent

RE: [sqlite] Extremely new to SQLite

2007-08-07 Thread Lee Crain
newer, preferred interface. Lee -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 07, 2007 5:08 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Extremely new to SQLite Lee Crain wrote: > Dennis, > > A

[sqlite] Is SQLite Case Sensitive?

2007-08-07 Thread Lee Crain
le WHERE field1 = 'a'; Vs. SELECT * FROM table WHERE field1 = 'A'; If SQLite is case sensitive, is there an easy override for this to enforce all lowercase letters? Thanks, Lee Crain --

RE: [sqlite] Extremely new to SQLite

2007-08-07 Thread Lee Crain
d*, char**); The sqlite3_exec function works much as it did in SQLite version 2. Zero or more SQL statements specified in the second parameter are compiled and executed. Query results are returned to a callback routine." --- I couldn't find a reference to its depre

RE: [sqlite] Security Problem C/C++

2007-08-06 Thread Lee Crain
Severin, The "sqlite3_open( )" call is hard to break. Try breakpointing into the sqlite3 source code to see what the failure is. Lee Crain __ -Original Message- From: Severin Müller [mailto:[EMAIL PROTECTED] Sent: Monday, August 06, 2007 4:42 PM To: sq

RE: [sqlite] A Data Importation Question

2007-07-31 Thread Lee Crain
les one record at a time and INSERT each record into our database. Best regards, Lee Crain __ -Original Message- From: Griggs, Donald [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 3:35 PM To: sqlite-users@sqlite.org Subject: RE: [sqlite] A Data Importat

[sqlite] A Data Importation Question

2007-07-31 Thread Lee Crain
Just in case I have missed something in the SQLite documentation, I'll ask this question: "Is there a SQLite API call that will facilitate data importation from TAB character delimited flat files?" If not, I will write the software to do it. Thanks, Lee Crain

RE: [sqlite] callback and sequence number of iteration

2007-07-20 Thread Lee Crain
I suggest creating a static counter. Initialize it to zero before you call the "sqlite3_exec( )" function and increment it once for each call to the "callback" function. After all records are read and the call to "sqlite3_exec( )" returns, the counter will sho

RE: RE: [sqlite] Problem: Can't See Tables in Database

2007-07-03 Thread Lee Crain
uming your time. Thank you for your assistance. Sincerely, Lee Crain

RE: [sqlite] Problem: SQLite C++ Examples in the SQLite Documentation No Longer Work; Can't See Tables in Database

2007-07-03 Thread Lee Crain
o any other suggestions as to what the problem might be. I hope you are correct that the problem will turn out to be something very small. Sincerely, Lee Crain Senior Software Engineer DAZ 3D Productions 801-495-1777, x759 [EMAIL PROTECTED] ___

RE: [sqlite] Problem: Can't See Tables in Database

2007-07-03 Thread Lee Crain
ation as I can think of. I am open to any other suggestions as to what the problem might be. I hope you are correct that the problem will turn out to be something very small. Sincerely, Lee Crain Senior Software Engineer DAZ 3D Productions 801-495-1777, x759 [EMAIL PROTECTED]

[sqlite] Problem: SQLite C++ Examples in the SQLite Documentation No Longer Work; Can't See Tables in Database

2007-07-02 Thread Lee Crain
ve that might be corrupted? If so, how do I resolve the problem with it? Thanks, Lee Crain Senior Software Engineer DAZ 3D Productions 801-495-1777, x759 [EMAIL PROTECTED]

[sqlite] Problem: Can't See Tables in Database

2007-07-02 Thread Lee Crain
Msg ); Sleep( 15000 ); sqlite3_free( zErrMsg ); return( 1 ); } The commented out lines execute correctly. The "SELECT * FROM Categories" line always fails. What could be the problem? Thanks, Lee Crain Senior Software Engineer DAZ 3D Productions 801-495-1777, x759