Re: [sqlite] Expression Indexes - can I project the expression value from the index?

2016-08-31 Thread Deon Brewis
Sorry! My bad. I work in one of those shops where everything from a feature request, to a task, to a customer support issue, to an actual software defect is referred to as a "bug". I forget it doesn't always translate. Thanks for looking into it! - Deon -Original Message- From: sqlite-

Re: [sqlite] Expression Indexes - can I project the expression value from the index?

2016-08-31 Thread Richard Hipp
On 8/31/16, Deon Brewis wrote: > Thanks! I'll be willing to test this beta once it's available. > > One more thing - I think there is a bug here in the query planner I'm pedantic about this because it is important: What you describe is not a bug. A bug means it gets the wrong answer. Getting t

Re: [sqlite] Expression Indexes - can I project the expression value from the index?

2016-08-31 Thread Deon Brewis
Thanks! I'll be willing to test this beta once it's available. One more thing - I think there is a bug here in the query planner if there is an indexed expression in an index. It doesn't seem to think an index is ever covering if the inputs to the expression isn't in the index as well. E.g. CRE

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread Scott Robison
On Aug 31, 2016 5:29 AM, "sanhua.zh" wrote: > > BTW, what do you think if I mapseparatly instead of the whole db file, ... I suspect that it wouldn't really help you much, if any. One, there is overhead in making that many system calls to map a bunch of 4 MiB buffers. Two, once you've mapped th

Re: [sqlite] Expression Indexes - can I project the expression value from the index?

2016-08-31 Thread Richard Hipp
On 8/31/16, Deon Brewis wrote: > > CREATE INDEX FOOINDEX on FOO(func(col)) > > HOWEVER, if I run: > SELECT func(col) FROM FOO INDEXED BY FOOINDEX WHERE func(col) = 42; > > It will execute the breakpoint on func(col) for every row in the table, even > though FOOINDEX is a covered index wrt. that qu

[sqlite] Expression Indexes - can I project the expression value from the index?

2016-08-31 Thread Deon Brewis
Let's say I have an expression index: CREATE INDEX FOOINDEX on FOO(func(col)) And then I use that index: SELECT bar FROM FOO INDEXED BY FOOINDEX WHERE func(col) = 42; I can see that it will use the stored value, since if I put a breakpoint on func, it won't hit. Good and well. HOWEVER, if I r

Re: [sqlite] REQUETES

2016-08-31 Thread Brice André
Hello, Maybe replace "ZONAGES_SHP_TAB2016".'identifiant' by "ZONAGES_SHP_TAB2016"."identifiant" or by "ZONAGES_SHP_TAB2016".identifiant ? Regards, Brice 2016-08-31 15:21 GMT+02:00 Igor Korot : > Hi, > > On Wed, Aug 31, 2016 at 9:14 AM, REGIANY Lucie > wrote: > > > > HELLO > > I WOULD DO SELECT

[sqlite] Virtual table

2016-08-31 Thread Maria de Jesus Philadelpho
Hi, I implement the SQLite extension, virtcsv, which allows attaching a CSV file as a virtual table. At a command line everything works just fine, why I can't see the result of a select * from table using the SQLitestudio 3.0.7? See the attached snapshot. regards, Maria Azevedo -- _

Re: [sqlite] REQUETES

2016-08-31 Thread Igor Korot
Hi, On Wed, Aug 31, 2016 at 9:14 AM, REGIANY Lucie wrote: > > HELLO > I WOULD DO SELECT FROM MY TABLE > select * > FROM "_L93_ZONAGES_exportdirectory_list" > WHERE "_L93_ZONAGES_exportdirectory_list".'TYPE' LIKE 'TAB%' > OR > "_L93_ZONAGES_exportdirectory_list".'TYPE' LIKE 'SHP%' > > AND AND SAVE

[sqlite] REQUETES

2016-08-31 Thread REGIANY Lucie
HELLO I WOULD DO SELECT FROM MY TABLE select * FROM "_L93_ZONAGES_exportdirectory_list" WHERE "_L93_ZONAGES_exportdirectory_list".'TYPE' LIKE 'TAB%' OR "_L93_ZONAGES_exportdirectory_list".'TYPE' LIKE 'SHP%' AND AND SAVE THE RESULT IN A NEW TABLE ZONAGES__SHP_ TAB2016 I WOULD DO SELECT FROM MY T

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread Simon Slavin
On 31 Aug 2016, at 12:28pm, sanhua.zh wrote: > BTW, what do you think if I mapseparatly instead of the whole db file, which > is the way I mentioned before ? Sorry but I have no experience with that. I hope other people can advise you. Simon. ___ s

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread sanhua.zh
Unless your users have complained about speed, this does not matter. There is no need to make everything happen as fast /as possible/. Try using just standard SQLite and find out if it is fast /enough/. Then you don't have to spend lots of programming time learning tiny little details about one

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread Simon Slavin
On 31 Aug 2016, at 9:39am, sanhua.zh wrote: > Yes. even on iDevice, [mmap] can get faster than sequential I/O. Sometime it > will be twice faster. Unless your users have complained about speed, this does not matter. There is no need to make everything happen as fast /as possible/. Try using

[sqlite] Bad Date headers when downloading from sqlite.org

2016-08-31 Thread Andy Wingo
Hi, If I download a sqlite, here is the first bit of a wget transcript: $ wget -S https://sqlite.org/2016/sqlite-autoconf-3140100.tar.gz --2016-08-30 23:15:34-- https://sqlite.org/2016/sqlite-autoconf-3140100.tar.gz Resolving sqlite.org (sqlite.org)... 2600:3c00::f03c:91ff:fe96:b959,

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread sanhua.zh
OK, I get your idea. Thanks for your advice. :) 原始邮件 发件人:Stephan bealsgb...@googlemail.com 收件人:SQLite mailing listsqlite-us...@mailinglists.sqlite.org 发送时间:2016年8月31日(周三) 17:09 主题:Re: [sqlite] Why MMAP return ENOMEM in SQLite? On Wed, Aug 31, 2016 at 11:03 AM, sanhua.zh sanhua...@foxmail.com wr

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread Stephan Beal
On Wed, Aug 31, 2016 at 11:03 AM, sanhua.zh wrote: > Why do you think it will corrupt the database? > Can you give me more explainations or examples? > It's only my intuition - i don't have a concrete example. sqlite and ios are "well-oiled machines." They do their jobs and they do it well. If y

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread sanhua.zh
Why do you think it will corrupt the database? Can you give me more explainations or examples? 原始邮件 发件人:Stephan bealsgb...@googlemail.com 收件人:SQLite mailing listsqlite-us...@mailinglists.sqlite.org 发送时间:2016年8月31日(周三) 16:57 主题:Re: [sqlite] Why MMAP return ENOMEM in SQLite? On Wed, Aug 31, 201

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread Stephan Beal
On Wed, Aug 31, 2016 at 10:55 AM, sanhua.zh wrote: > Yes, [mmap] can be larger than physical memory. > Indeed, my mistake. > And what do you think about the new mapping way I mentioned ? > i think it's a "huge can of worms" - it's asking for more, bigger problems than the perceived performanc

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread sanhua.zh
Yes, [mmap] can be larger than physical memory. And what do you think about the new mapping way I mentioned ? 原始邮件 发件人:Stephan bealsgb...@googlemail.com 收件人:SQLite mailing listsqlite-us...@mailinglists.sqlite.org 发送时间:2016年8月31日(周三) 16:53 主题:Re: [sqlite] Why MMAP return ENOMEM in SQLite? On W

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread Stephan Beal
On Wed, Aug 31, 2016 at 10:43 AM, Stephan Beal wrote: > On Wed, Aug 31, 2016 at 10:39 AM, sanhua.zh wrote: > >> In my testcase, I can only [mmap] a db file at most 1.4GB size. But in >> this new way, I can map a file at most 3.2GB. The test device is iPhone 6S. >> > > According to google, the iP

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread Stephan Beal
On Wed, Aug 31, 2016 at 10:39 AM, sanhua.zh wrote: > In my testcase, I can only [mmap] a db file at most 1.4GB size. But in > this new way, I can map a file at most 3.2GB. The test device is iPhone 6S. > According to google, the iPhone 6s only has 2GB of RAM, so you can't memmap 3.2G. In any cas

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread sanhua.zh
Thanks for your answer. Simon Why are you trying to do memory-mapping on a portable device ? Is it for speed ? Do you absolutely need it ? Yes. even on iDevice, [mmap] can get faster than sequential I/O. Sometimes it will be twice faster. Simon Won't the standard SQLite API do the job well enoug

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread sanhua.zh
Thanks for your answer. Simon Why are you trying to do memory-mapping on a portable device ? Is it for speed ? Do you absolutely need it ? Yes. even on iDevice, [mmap] can get faster than sequential I/O. Sometime it will be twice faster. Simon Won't the standard SQLite API do the job well en