Re: [sqlite] Unrecognized "Z" UTC time zone signifier

2008-02-21 Thread Aristotle Pagaltzis
`Z` a shortcut for `+00`; no provision is made for other symbolic names as those only cause trouble. So you should have no trouble refusing requests to support those. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> ___ sqlite-users mailing

Re: [sqlite] Most widely deployed?

2008-02-21 Thread Aristotle Pagaltzis
* Shawn Wilsher <[EMAIL PROTECTED]> [2008-02-21 20:00]: > > Every copy of Firefox 3 contains a copy of SQLite. > And Firefox 2 ;) Really? What is it used for? Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> ___ sqli

Re: [sqlite] Most widely deployed?

2008-02-21 Thread Aristotle Pagaltzis
p, much less the commercial ones. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] IE6 (was: Updatable views)

2008-02-17 Thread Aristotle Pagaltzis
of breakage between two versions of any of their browsers would be small, whereas MSFT ignored the browser for some six years. *That* is how they buggered up. Anyway. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> ___ sqlite-user

Re: [sqlite] Mailing List Changes

2008-02-04 Thread Aristotle Pagaltzis
ated support for mailing lists, nearly half a century after the birth of SMTP.) Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Re: Strange error "Incomplete SQL"

2008-01-21 Thread Aristotle Pagaltzis
* Aristotle Pagaltzis <[EMAIL PROTECTED]> [2008-01-21 22:29]: > $ echo -e '\n;' >> error > $ sqlite < x > $ Err, the 2nd line is of course > $ sqlite < error Regards, -- Aristotle Pagalt

[sqlite] Re: Strange error "Incomplete SQL"

2008-01-21 Thread Aristotle Pagaltzis
a terminator after that. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: "Can't we all just get along?" [Was: Re: "always-trim" - feature suggestion]]

2008-01-09 Thread Aristotle Pagaltzis
hread yet). Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: "always-trim" - feature suggestion

2008-01-09 Thread Aristotle Pagaltzis
nted features are by definition bloat. Linus Torvalds once said that his most important job as the maintainer of the kernel is to say no to most suggested additions. I’m sure Dr. Hipp could give a list of things he would remove from SQLite if backward compatibility was not a concer

[sqlite] Re: "always-trim" - feature suggestion

2008-01-09 Thread Aristotle Pagaltzis
* Zbigniew Baniewski <[EMAIL PROTECTED]> [2008-01-09 12:15]: > Keep your flamewar just to yourself, will you? I’m sorry if that’s all you saw in my mail. Regards, -- Aristotle Pagaltzis // <http://pla

[sqlite] Re: "always-trim" - feature suggestion

2008-01-09 Thread Aristotle Pagaltzis
ryone’s problems, not just the butt-pimple of the week. A language designer must be even better at doing this, because many, many people will be stuck with the language for years. SQLite’s design doesn’t quite constitute a full-blown language, but it’s more demanding than a plain libra

[sqlite] Re: Trying to use SQLite3 with PHP5....

2008-01-04 Thread Aristotle Pagaltzis
nciple any of the current crop of dynamic languages should suffice, though the major ones do not make it nearly as easy as Tcl to write bindings to C libraries. (I hear that Ruby is not half bad in this regard, though.) Regards, -- Aristotle Pagalt

[sqlite] Re: EXISTS and NULLs

2008-01-02 Thread Aristotle Pagaltzis
at this construct must work in MySQL, Postgres, Oracle, DB2, SQL Server and Sybase. It’s a safe bet that SQLite works as expected. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: Fastest way to check if new row or update existing one?

2007-12-25 Thread A. Pagaltzis
r the `rowcount` attribute on the Cursor class. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: Fastest way to check if new row or update existing one?

2007-12-25 Thread A. Pagaltzis
SERT`. In #1, you always get the job done with a single query. In #2, you are usually done after the first but sometimes need a second. Both are more efficient than your current approach, which always runs two queries. Regards, -- Aristotle Pagaltzis // <h

[sqlite] Re: Improving performance of SQLite. Anyone heard of DeviceSQL?

2007-12-15 Thread A. Pagaltzis
o violate the terms of contract. Oracle seems to survive just fine, say. For the executive summary on the matter, read this short essay: “Enterprise software” is a social, not technical, phenomenon http://lists.canonical.org/pipermail/kragen-tol/2005-April/000772.html Regards, -- Aristotle

[sqlite] Re: DeviceSQL

2007-12-12 Thread A. Pagaltzis
duct’s features may the claim quite plausible, because you pay a hefty cut in features and reliability in exchange for a very large increase in speed; a price that many may well find unacceptable. (It is, after all, easy, as they say, to compute the wrong answer in constant time.) Regard

[sqlite] Re: .dump/.load not workin in 3.4.0 or later for "large" rows?

2007-12-12 Thread A. Pagaltzis
do this > automatically... Maybe it would be worthwhile to ifdef the checks so that one can set SQLITE_MAX_SQL_LENGTH to 0 to get the old behaviour back, and then make that the default? Then people like the Google Gears folks can compile with an appropriate limit and no one else is affected. Regar

[sqlite] Re: In Mem Query Performance

2007-06-30 Thread A. Pagaltzis
omeone might be able to tell you what about them makes SQLite go so slow and how to make it faster. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: CAST

2007-05-30 Thread A. Pagaltzis
t has to be worked around. Can you give an example of such a case? I work with several different DBMSs, myself, and I have yet to run into trouble with SQLite’s approach. Can you give a reallife example? Regards, -- Aristotle Pagaltzis // <h

[sqlite] Re: Problem with Unicode surrogates

2007-05-16 Thread A. Pagaltzis
uch partially corrupted data, it should explicitly do its own scrubbing. There is code to do this in all languages you’d care to use and many you wouldn’t. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: Help wiith SQL - first row of each group

2007-05-09 Thread A. Pagaltzis
www.sysarch.com/Perl/sort_paper.html Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: Powered by SQLite image?

2007-05-05 Thread A. Pagaltzis
to SQLite? They’d make excellent additions to the art/ directory in the source tarball. (I’m not sure what it would take for Dr. Hipp to include them?) Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: DB design questions

2007-04-21 Thread A. Pagaltzis
xamination code, that then also has to be debugged and maintained.) Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: DB design questions

2007-04-21 Thread A. Pagaltzis
query logic; complex queries have to be performed in application code after retrieving the entire set of possibly- relevant data. You’re better off using some other kind of data store than an SQL database if you really need storage for that kind of model. Regards, -- Aristotle Pagaltzis // <http://

[sqlite] Re: Some questions on hierarchical data (nested set model)

2007-04-13 Thread A. Pagaltzis
rgt + @displace_width END WHERE rgt BETWEEN @affected_lft AND @affected_rgt; Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: Some questions on hierarchical data (nested set model)

2007-04-09 Thread A. Pagaltzis
rence between the `lft` and `rgt` values of the source node. • Modify the WHERE clause and calculations in the final UPDATE so it moves an entire tree, not just a single node. It shouldn’t be hard, it just takes a

[sqlite] Re: storing funky text in TEXT field

2007-04-05 Thread A. Pagaltzis
of what real browsers really do.) > Plus, you run the risk of a user forcing the browser's encoding > to something other than what you intended. You may want to take a look at this: HEBCI: HTML Entity-Based Codepage Inference http://www.joshisanerd.com/set/ Regards, -- A

[sqlite] Re: SQL and SQLite pronounciation?

2007-04-04 Thread A. Pagaltzis
* Dennis Cote <[EMAIL PROTECTED]> [2007-04-04 22:30]: > I prefer "ess cue el" and "ess cue light" myself. That’s what I say. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> -

[sqlite] Re: Fwd: database is locked error on Mac OS X

2007-03-10 Thread A. Pagaltzis
ou don’t want to do it yourself: would it take a lot of research to learn how to do it? If not, and you’d be willing to accept a patch, I might contribute one.) Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> -

[sqlite] Re: UNIQUE constraint on column

2007-02-05 Thread A. Pagaltzis
* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2007-02-04 13:35]: > "A. Pagaltzis" <[EMAIL PROTECTED]> wrote: > > It's a pity that INSERT OR IGNORE (apparently?) does not set > > last_insert_id properly regardless of outcome, > > Consider this case: >

[sqlite] Re: Memory database to file

2007-02-03 Thread A. Pagaltzis
* David Champagne <[EMAIL PROTECTED]> [2007-02-01 15:45]: > I suppose since no one replied to this, that it's not possible > to do it. Just wanted to confirm. Thank you... http://en.wikipedia.org/wiki/Warnock%27s_Dilemma :-) Regards, -- Aristotle Pagaltzis // <http://

[sqlite] Re: UPDATE OR REPLACE same as UPDATE?

2007-02-03 Thread A. Pagaltzis
- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: UNIQUE constraint on column

2007-02-03 Thread A. Pagaltzis
eciding. It’s a pity that INSERT OR IGNORE (apparently?) does not set last_insert_id properly regardless of outcome, otherwise it could be reduced to just two INSERTs doing absolutely no duplicate work. Regards, -- Aristotle Pagaltzis // &l

[sqlite] Re: UNIQUE constraint on column

2007-02-02 Thread A. Pagaltzis
so, for his application. And in any case, while that subselect will indeed operate on cached data and therefore be very quick, it will still re-do work that was already done before. If there’s a way to avoid duplicate work cleanly and simply, why not use it? Regards, -- Aris

[sqlite] Re: UNIQUE constraint on column

2007-02-02 Thread A. Pagaltzis
rt_id correctly in that case, though? Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: Shared Lock Transactions

2007-01-24 Thread A. Pagaltzis
Reasoning by analogy rarely leads to anything but a fallacy. A shared lock prevents exclusive locks from being granted and an exclusive lock prevents shared locks from being granted, so I’m not sure what sort of sharing/preventing business you’re talking about anyway. Regards, --

[sqlite] Re: Shared Lock Transactions

2007-01-21 Thread A. Pagaltzis
, and you cannot acquire an exclusive lock while there are *any* locks, even if they are all shared. It makes a lot of sense. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send

[sqlite] Re: .mode html output character conversion

2007-01-06 Thread A. Pagaltzis
Positively Must Know About Unicode and Character Sets (No Excuses!) http://www.joelonsoftware.com/articles/Unicode.html If you have never read anything about the basics of charsets, you should really read it. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: When to release version 3.3.10?

2007-01-06 Thread A. Pagaltzis
e bugs are lurking, and then only if accompanied by notice as per Dennis’ suggestion with a fixed date for the next release. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: What about Foreign Key support (when?)

2007-01-06 Thread A. Pagaltzis
_key_triggers.html> <http://www.rcs-comp.com/site/index.php/view/Utilities-SQLite_foreign_key_trigger_generator> Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: sqlite performance, locking & threading

2006-12-30 Thread A. Pagaltzis
ed that i synchronise operations in such a way that > the list does not get corrupted. That scenario is meaningless as an analogy. The right analogy would be if the linked list were an internal datastructure that is part of the implementation of a library but not of its public API. Regards, -- Aris

[sqlite] Re: multiple selects in a single prepare

2006-12-29 Thread A. Pagaltzis
), count(state='Critical') FROM tbl1; How exactly does this work? I assume it involves data type coercion, but what are the rules and effects? Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: multiple selects in a single prepare

2006-12-29 Thread A. Pagaltzis
SELECT COUNT( CASE state WHEN 'Normal' THEN 1 ELSE NULL END ) AS num_normal, COUNT( CASE state WHEN 'Critical' THEN 1 ELSE NULL END ) AS num_critical FROM tbl1 Regards, -- Aristot

[sqlite] Re: multiple selects in a single prepare

2006-12-27 Thread A. Pagaltzis
re > name = "bar" Just how is that supposed to work? Are you looking for the UNION operator, perchance? Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: converting from mysql?

2006-11-14 Thread A. Pagaltzis
n hopefully you’ll only have to edit the CREATE TABLE statements but will otherwise be able to feed it to SQLite verbatim. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: Is it bad to...

2006-11-10 Thread A. Pagaltzis
e to suggest a better approach which is no more complex to implement but doesn’t scare small children. :-) Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: Date data type

2006-11-07 Thread A. Pagaltzis
ave RFC 3339 datetime notation (itself a constrained subset of ISO 8601). It’s a very sensible idea to store datetimes this way. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: Regarding sqlite3_exec

2006-10-25 Thread A. Pagaltzis
F.ex. paged queries can be made cheaper by selecting results into a temporary table so that you can re-retrieve them with a much cheaper query. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To uns

[sqlite] Re: Regarding sqlite3_exec

2006-10-25 Thread A. Pagaltzis
ng cap you will > begin to see why you dont just read everything into memory for > the hell of it. > > Think about it. Thanks for your vote of confidence in my intelligence. Clearly, you are smart enough to f

[sqlite] Re: Regarding sqlite3_exec

2006-10-25 Thread A. Pagaltzis
you start processing. Or you don’t want the data, then you use a COUNT(*) query. In either case, it is only one query you need to run. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: Regarding sqlite3_exec

2006-10-24 Thread A. Pagaltzis
unt can only be returned *after* all the rows have been collected. By then you know the count yourself anyway. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: new sqlite-based webserver

2006-10-20 Thread A. Pagaltzis
GI module, did you? Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: SQLite Order BY

2006-10-09 Thread A. Pagaltzis
hms that run faster than O(n log n) are very rarely practical, however. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: The term "flat-file" as applied to sqlite

2006-09-25 Thread A. Pagaltzis
med that SQLite should be thought of as a replacement not for Oracle, but for `fopen()`. That casts the term "flatfile database" as a somewhat misleading way to say that SQLite is a database that you can use just like you would a flatfile. Regards, -- Aristotle Paga

[sqlite] Re: format for column names

2006-08-30 Thread A. Pagaltzis
sqlite> select "baz baz" from foo; baz baz Oops. In other words, if yoz like spurious bugs, then feel free to use double quotes. If you prefer robust code, then you’ll stay away from them. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> --

[sqlite] Re: Seems like a bug in the parser

2006-08-23 Thread A. Pagaltzis
* Alexei Alexandrov <[EMAIL PROTECTED]> [2006-08-23 09:20]: > All other databases I know will complain if you give them this query. Except MySQL, glory that it is. Regards, -- Aristotle Pagaltzis // <http://pla

[sqlite] Re: Foreign Keys

2006-08-09 Thread A. Pagaltzis
ty in SQLite with Triggers http://www.justatheory.com/computers/databases/sqlite/foreign_key_triggers.html Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

[sqlite] Re: Reading the same table from two threads

2006-07-26 Thread A. Pagaltzis
ion on their own through whichever means they choose. If that doesn’t seem like a good idea and you’d prefer a deeper change that implements native thread serialisation, I’d suggest to merely earmark that for a time when a backend interface change is unavoidable anyway, and revisit it then. Regards,

Re: [sqlite] reg:sqlite usage

2006-07-19 Thread A. Pagaltzis
es. It is also why it is easy to use on embedded devices, and why it does not require any configuration, user management or any of the other complex administration that client-server databases require. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] optimizing your sql

2006-07-11 Thread A. Pagaltzis
e is a performance problem, then run benchmarks to see what might work better. I see little point in microoptimisations, particularly in absence of a clear need for performance. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] optimizing your sql

2006-07-11 Thread A. Pagaltzis
* Jay Sprenkle <[EMAIL PROTECTED]> [2006-07-11 20:15]: > On 7/11/06, A. Pagaltzis <[EMAIL PROTECTED]> wrote: > >* Jay Sprenkle <[EMAIL PROTECTED]> [2006-07-10 17:30]: > >> // - Use SQL Joins instead of using sub-queries > > > >Not so fast there. I ha

Re: [sqlite] optimizing your sql

2006-07-11 Thread A. Pagaltzis
joins vs subqueries in any non-trivial query depends on a *lot* of variables. You can’t just say “use this one” or “use the other” as a blanket statement. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] Multiple Users

2006-07-04 Thread A. Pagaltzis
There are no issues of corruption. If you try to run 10,000 concurrent users, it won’t break, it’ll just get very slow. Well, there might be bugs, but SQLite is not known for them, nor for slowness; in contrast to Access. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] how make a case insensitive index

2006-06-26 Thread A. Pagaltzis
* Wilfried Mestdagh <[EMAIL PROTECTED]> [2006-06-26 15:45]: > How to make a case insensitieve index ? Add `COLLATE NOCASE` to the column definition. See http://www.sqlite.org/datatype3.html Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] Need sql query help

2006-06-25 Thread A. Pagaltzis
you’re not indexing any of the facts you query. You’re just doing a scan across all of the table, doing string matches on one column in each row. There’s no point in using a database for that. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] Need sql query help

2006-06-25 Thread A. Pagaltzis
d to walk the string using a loop in a machine-oriented language like C and check characters directly. If you need to go even faster, then you’ll need an inverted index on letters for the whole dataset. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] problem with creating a table

2006-06-25 Thread A. Pagaltzis
* Bijan Farhoudi <[EMAIL PROTECTED]> [2006-06-25 17:05]: > A. Pagaltzis wrote: > >.headers on > >SELECT [order] FROM foo > > But how would you know the name of the col is "order" not > "[order]"? That’s what `.headers on` was supposed

Re: [sqlite] problem with creating a table

2006-06-25 Thread A. Pagaltzis
values(1,2); > sqlite> select order from foo > ...> ; > SQL error: near "order": syntax error > > Any other idea? .headers on SELECT [order] FROM foo Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] Need sql query help

2006-06-25 Thread A. Pagaltzis
umn or dependent table so you can create indices and query them quickly. Of course if the performance of the simpleminded approach is sufficient for you, then all the better. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] Improving insert speed?

2006-06-24 Thread A. Pagaltzis
- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] Avoiding duplicate record insertion

2006-06-18 Thread A. Pagaltzis
UNIQUE( fname, lname, street ) ); Trying to `INSERT` a duplicate row will then throw an error. If you don’t care to know about dupes and just want to bung the data into the table, use `INSERT OR IGNORE ...` so failure will be silent. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] Avoiding Fragmentation of SQLite database file ???

2006-06-14 Thread A. Pagaltzis
tend to be designed such that as long as there is sufficient free space on the device, fragmentation will remain insignificant. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] Problems with multiple threads?

2006-06-07 Thread A. Pagaltzis
g list posts. It’s interesting that there’s no way to force a SHARED lock to be obtained immediately. The available mechanisms allow serialising write operations with respect to each other, but not forcing a well-defined sequence of read operations relative to write operations. Regards, -- Aristot

Re: [sqlite] Problems with multiple threads?

2006-06-07 Thread A. Pagaltzis
operations can proceed apace. Of course, if your writes are short and frequent, they will likely take much longer than necessary if all your operations acquire read locks before they *really* need them. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] [Video] An Introduction to SQLite

2006-06-04 Thread A. Pagaltzis
His mention of using SQLite as a file format was a mind expander; however obvious it might be in retrospect. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

[sqlite] [Video] An Introduction to SQLite

2006-06-03 Thread A. Pagaltzis
in it, but there are interesting cues and bits in there. I like it. [Apologies if this has already been posted about in a more appropriate venue; I didn’t see it on the list or the homepage.] Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] Strange behavior with sum

2006-06-02 Thread A. Pagaltzis
* Klint Gore <[EMAIL PROTECTED]> [2006-06-02 07:30]: > sqlite> select cast(sum(f1) as double)/cast(sum(f2) as double) from bob; > 0.869779988128673 Just casting one of them is sufficient, btw. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] .import difficulty

2006-06-02 Thread A. Pagaltzis
ame tbl_name rootpage sql - - table b;b;2 CREATE TABLE [b;] (a,b,c) :-) Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] .import difficulty

2006-06-02 Thread A. Pagaltzis
o such table: b;` – note the semicolon. A table called `b;` does indeed not exist. If you omit the semicolon or separate it with a space, the command will work. SQLite shell commands (which start with a dot) are single-line and need not be terminated. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] Purging the mailing list roles. Was: Please Restore Your Account Access

2006-05-30 Thread A. Pagaltzis
il away will silently drop out after failing to respond to the opt-in mail. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] LIMIT and paging records

2006-05-29 Thread A. Pagaltzis
st in that case, what you want should be possible. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] Purging the mailing list roles.

2006-05-29 Thread A. Pagaltzis
pond to renewal mails is a pretty easy task. But not many people are likely to actually do that. You'd want to check whether it's actually unsubscribing anyone after several months of running it, though, to make sure you aren't just bugging lurkers for no benefit. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] seeking answers for a few questions about indexes

2006-05-26 Thread A. Pagaltzis
to use additional indexes and if > so then duplicate it. But it can’t: using `UNION ALL` will return duplicates whereas using `OR` won’t, so you can’t substitute the former for the latter. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] can you speed this query up?

2006-05-23 Thread A. Pagaltzis
* A. Pagaltzis <[EMAIL PROTECTED]> [2006-05-23 09:40]: > Now we can group together the conditions which do not involve > the `bounds` table: > > (r.qi = 5604 AND r.ri <= 5468) OR (r.ri = 5468 AND r.qi <= 5604) > AND r.qi >= b.bqis > AND

Re: [sqlite] can you speed this query up?

2006-05-23 Thread A. Pagaltzis
* Adrian Ho <[EMAIL PROTECTED]> [2006-05-23 16:05]: > On Tue, May 23, 2006 at 08:50:56AM +0200, A. Pagaltzis wrote: > > * [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2006-05-23 02:35]: > > > What you have to do is: > > > > > >SELECT qi, ri, drl,

Re: [sqlite] can you speed this query up?

2006-05-23 Thread A. Pagaltzis
Great. :-) Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] can you speed this query up?

2006-05-23 Thread A. Pagaltzis
) ORDER BY r.score DESC LIMIT 1 I can’t interpret the `EXPLAIN` output well enough to tell whether this is likely to be faster, I’m afraid. (Actually I don’t even understand how to tell whether/which indices are being used; I tried creating a few and they didn’t seem to make a discernible difference.) Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] can you speed this query up?

2006-05-23 Thread A. Pagaltzis
, drl, score FROM ... WHERE ... ORDER BY score DESC LIMIT 1 Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] can you speed this query up?

2006-05-22 Thread A. Pagaltzis
the `WHERE` clause from scratch by redoing the entire query, instead of using the already-computed result set from the `FROM` clause. In that case you don’t gain any performance, “only” clarity. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] Integer / Numeric calculations

2006-05-22 Thread A. Pagaltzis
* Mikey C <[EMAIL PROTECTED]> [2006-05-22 08:00]: > If have tried cast both rating and votes and the result to NUMERIC but still > an integer. Cast one of them to REAL. SELECT CAST( rating AS REAL ) / votes FROM foo; Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] Adding colomns when the database/schema already exists

2006-05-13 Thread A. Pagaltzis
day ago, two threads before yours. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] XML to SQLite upload

2006-05-07 Thread A. Pagaltzis
y when the bulk of your queries are INSERTs; in other scenarios, other options will likely prevail. > As you can imagine, rebuilding the relationships isn't a simple > query - lots of self correlation etc. Yeah, that’s the problem when retrieving hierarchical data modelled using self-referrentia

Re: [sqlite] sqlite driven web-site

2006-05-05 Thread A. Pagaltzis
Hi Vivek, * Rajan, Vivek K <[EMAIL PROTECTED]> [2006-05-05 07:35]: > Has someone done something like that and would share their > experience on this topic. have a look at Catalyst: http://www.catalystframework.org/ (Installation can be a pain; if you have problems, don’t miss CatInABox:

Re: [sqlite] XML to SQLite upload

2006-05-04 Thread A. Pagaltzis
t you typically want to do with a database. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] XML to SQLite upload

2006-05-04 Thread A. Pagaltzis
The question does not preclude an answer; it just gives too few constraints to answer it usefully. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] XML to SQLite upload

2006-05-04 Thread A. Pagaltzis
* Rajan, Vivek K <[EMAIL PROTECTED]> [2006-05-05 02:20]: > Does someone have XML to SQLite upload utility in perl/C++? That’s like asking if someone has an ASCII to CSV “upload utility”. It doesn’t make any sense. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

Re: [sqlite] sqlite puzzle

2006-05-02 Thread A. Pagaltzis
And to correct myself one last time: * A. Pagaltzis <[EMAIL PROTECTED]> [2006-05-03 00:30]: > Assuming your client names are unique, this should work: > > SELECT > ( > SELECT > COUNT(*) > FROM clients c2 >

Re: [sqlite] sqlite puzzle

2006-05-02 Thread A. Pagaltzis
* A. Pagaltzis <[EMAIL PROTECTED]> [2006-05-03 00:30]: > I tried to do it with a join to see if that would work better, > but I’m too frazzled to figure it out right now. I must be more frazzled than I thought. SELECT n1.name, COUNT( n2.name ) rank FROM names

Re: [sqlite] sqlite puzzle

2006-05-02 Thread A. Pagaltzis
o it with a join to see if that would work better, but I’m too frazzled to figure it out right now. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>

  1   2   >