Re: [sqlite] change ORDER BY slowly

2017-03-27 Thread Keith Medcalf
If you really want to filter as you have specified, then it will take a while. This is because the entire query must be performed (up to the point you are applying the order), then sorted, then the top rows selected to match you limit, then any remaining outer joins performed. Or you can

Re: [sqlite] change ORDER BY slowly

2017-03-27 Thread Keith Medcalf
move the join to immediately follow the FROM clause remove the word "left" > -Original Message- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > On Behalf Of MONSTRUO Hugo González > Sent: Monday, 27 March, 2017 09:35 > To: sqlite-users@mailinglists.sqlite.org

Re: [sqlite] change ORDER BY slowly

2017-03-27 Thread David Raymond
The main issue there I believe is that the order by/limit for the first two is on the outermost table, so it can order by/limit that right away. In the last query the order by/limit is on a table in the middle, so it can't order or filter on it right away, and needs the temp tree there. I saw

Re: [sqlite] How does one block a reader connection?

2017-03-27 Thread Jens Alfke
> On Mar 26, 2017, at 11:37 PM, Hick Gunter wrote: > > I think this kind of problem (transfer of information between cooperating > processes) is best solved using the tools designed for inter-process > communication and not attempting to abuse a DB system designed to isolate

Re: [sqlite] change ORDER BY slowly

2017-03-27 Thread Simon Slavin
On 27 Mar 2017, at 4:35pm, MONSTRUO Hugo González wrote: > nbmCodigo VARCHAR (6) VARCHAR 6 I wanted to note that SQLite completely ignores VARCHAR and any size limits. As far as SQLite is concerned, all those fields are TEXT fields and can contain any number of

[sqlite] change ORDER BY slowly

2017-03-27 Thread MONSTRUO Hugo González
Hi, I have a phone book (bm_ppal), 726.000 rows, 10 columns This phone book have this columns Name Declared Type Type Size nbmId INTEGER INTEGER nbmCodigo VARCHAR (6) VARCHAR 6 abmNombre VARCHAR (320) VARCHAR 320 abmNombrePlano VARCHAR (320) VARCHAR 320 nbmCiudad INTEGER INTEGER nbmTelefono

Re: [sqlite] What are the rules for defining names for tables and columns?

2017-03-27 Thread em...@n0code.net
:) Roger that. > On Mar 27, 2017, at 10:58 AM, Hick Gunter wrote: > >> -Ursprüngliche Nachricht- >> em...@n0code.net wrote: >>> I’ve scoured the archives and the sqlite documentation but can’t find >>> the definitive rules for defining table and column names. >> >>

Re: [sqlite] What are the rules for defining names for tables and columns?

2017-03-27 Thread Hick Gunter
>-Ursprüngliche Nachricht- >em...@n0code.net wrote: >> I’ve scoured the archives and the sqlite documentation but can’t find >> the definitive rules for defining table and column names. > >Everything is allowed, except names beginning with "sqlite_". > This calls for a (not quite) OT

Re: [sqlite] What are the rules for defining names for tables and columns?

2017-03-27 Thread em...@n0code.net
Wow! Ok - awesome! Thanks! > On Mar 27, 2017, at 10:45 AM, Clemens Ladisch wrote: > > em...@n0code.net wrote: >> I’ve scoured the archives and the sqlite documentation but can’t find the >> definitive rules >> for defining table and column names. > > Everything is

Re: [sqlite] What are the rules for defining names for tables and columns?

2017-03-27 Thread Clemens Ladisch
em...@n0code.net wrote: > I’ve scoured the archives and the sqlite documentation but can’t find the > definitive rules > for defining table and column names. Everything is allowed, except names beginning with "sqlite_". > I did see we can’t use keywords The documentation disagrees:

Re: [sqlite] 3.17.0 bug report: FTS5 insertion puts a wrong value in last_insert_rowid

2017-03-27 Thread Gwendal Roué
* Florian Weimer wrote: > * Gwendal Roué: > >> I have found a regression in SQLite 3.17.0. In the following SQL statements: >> >>CREATE VIRTUAL TABLE t1 USING FTS5(content); >>INSERT INTO t1(content) VALUES ('some text'); >>SELECT last_insert_rowid(); // 10

[sqlite] What are the rules for defining names for tables and columns?

2017-03-27 Thread em...@n0code.net
Hi, I’ve scoured the archives and the sqlite documentation but can’t find the definitive rules for defining table and column names. I did see we can’t use keywords and tables can not begin with sqlite_. Are there others? What characters can we use? Is it the same as MySQL? Thanks, Eric

Re: [sqlite] How does one block a reader connection?

2017-03-27 Thread Hick Gunter
Hey, neat idea! To expand on my previous post: CREATE TRIGGER wakeup AFTER INSERT ON cmd BEGIN SELECT cond_broadcast('cmd_ready'); END; -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Richard Damon Gesendet: Sonntag, 26.

Re: [sqlite] How does one block a reader connection?

2017-03-27 Thread Hick Gunter
I think this kind of problem (transfer of information between cooperating processes) is best solved using the tools designed for inter-process communication and not attempting to abuse a DB system designed to isolate processes from unfinished changes. Have the processes share a condition