[sqlite] Index on expressions

2014-10-22 Thread Philippe Riand
Hello, If there any plan to get this in? (see: http://sqlite.org:8080/cgi-bin/mailman/private/sqlite-users/2014-September/055065.html ) Note that this seems implemented by several databases now, and this is a bit different from virtual columns, which is what the previous discussion ended with.

Re: [sqlite] Index on expressions

2014-10-22 Thread Nico Williams
On Wed, Oct 22, 2014 at 3:42 PM, Philippe Riand p...@riand.com wrote: Hello, If there any plan to get this in? (see: http://sqlite.org:8080/cgi-bin/mailman/private/sqlite-users/2014-September/055065.html ) You'll notice that the SQLite3 developers don't often discuss what features they will

Re: [sqlite] Index on expressions

2014-09-04 Thread Dominique Devienne
On Thu, Sep 4, 2014 at 2:04 AM, Nico Williams n...@cryptonector.com wrote: [...] but there's a gotcha: SELECT * on a table source with computed columns might result in much more work being done than the user might have expected. If that's a real concern, you can always use the existing

Re: [sqlite] Index on expressions

2014-09-04 Thread Klaas V
Dominique Devienne wrote: (double-click on new version) SQLite version 3.8.5 2014-06-04 14:06:34 (terminal) SQLite version 3.7.13 2012-07-17 17:46:21 This means you downloaded the new version in a directory not in your $PATH Add it to your path: set PATH=dir where new version is: $PATH If

Re: [sqlite] Index on expressions

2014-09-04 Thread Nico Williams
On Thu, Sep 4, 2014 at 3:59 AM, Dominique Devienne ddevie...@gmail.com wrote: On Thu, Sep 4, 2014 at 2:04 AM, Nico Williams n...@cryptonector.com wrote: [...] but there's a gotcha: SELECT * on a table source with computed columns might result in much more work being done than the user might

[sqlite] Index on expressions

2014-09-03 Thread Philippe Riand
Is there a way to create indexes based on expressions instead of simple columns (see: http://www.postgresql.org/docs/8.1/static/indexes-expressional.html)? The idea is to have some custom functions that extract data from a JSON column and allow a fast query based on an index. This is the strategy

Re: [sqlite] Index on expressions

2014-09-03 Thread Richard Hipp
SQLite does not (yet) support indexes on expressions. On Tue, Sep 2, 2014 at 9:06 PM, Philippe Riand p...@riand.com wrote: Is there a way to create indexes based on expressions instead of simple columns (see: http://www.postgresql.org/docs/8.1/static/indexes-expressional.html)? The idea is

Re: [sqlite] Index on expressions

2014-09-03 Thread Dominique Devienne
On Wed, Sep 3, 2014 at 2:52 PM, Richard Hipp d...@sqlite.org wrote: SQLite does not (yet) support indexes on expressions. This begs the question: Are there plans, possibly ongoing, to add this support? Any timeframe? Asked differently, if adding this support, could this be done by adding

Re: [sqlite] Index on expressions

2014-09-03 Thread Shane Harrelson
Use a trigger to populate your index column. http://www.sqlite.org/lang_createtrigger.html On Wed, Sep 3, 2014 at 9:01 AM, Dominique Devienne ddevie...@gmail.com wrote: On Wed, Sep 3, 2014 at 2:52 PM, Richard Hipp d...@sqlite.org wrote: SQLite does not (yet) support indexes on expressions.

Re: [sqlite] Index on expressions

2014-09-03 Thread Petite Abeille
On Sep 3, 2014, at 3:01 PM, Dominique Devienne ddevie...@gmail.com wrote: Asked differently, if adding this support, could this be done by adding virtual / computed columns to tables, and indexing those columns? Ohohohoho… virtual columns [1][2]…. yes… shinny! :) Now that would be rather

Re: [sqlite] Index on expressions

2014-09-03 Thread John McKown
On Wed, Sep 3, 2014 at 1:35 PM, Petite Abeille petite.abei...@gmail.com wrote: On Sep 3, 2014, at 3:01 PM, Dominique Devienne ddevie...@gmail.com wrote: Asked differently, if adding this support, could this be done by adding virtual / computed columns to tables, and indexing those columns?

Re: [sqlite] Index on expressions

2014-09-03 Thread Simon Slavin
On 3 Sep 2014, at 8:21pm, John McKown john.archie.mck...@gmail.com wrote: Those are _both_ nice features. I don't know for sure, but somehow it seems that virtual columns would be easier to implement. I'm used to calling them 'computed columns' but yes, they should be relatively easy to

Re: [sqlite] Index on expressions

2014-09-03 Thread Nico Williams
On Wed, Sep 3, 2014 at 6:16 PM, Simon Slavin slav...@bigfraud.org wrote: I'm used to calling them 'computed columns' but yes, they should be relatively easy to implement, as long as users accept a bunch of restructions on what they can refer to, roughly equivalent to the restrictions on what

Re: [sqlite] Index on expressions

2014-09-03 Thread Nico Williams
Also, of course, MERGE is very convenient, syntactically and semantically. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users