Re: [sqlite] [EXTERNAL] "Optional" incoming parameters for virtual tables

2019-04-18 Thread Max Vlasov
On Thu, 18 Apr 2019 at 09:48, Hick Gunter wrote: > So the QP is attemopting to determine which cost product is less: > > My guess is it will probably choose the undesired, invalid plan. A linear > cost penalty for desired but optional inputs is probably not going to cut > it. In this case, the

Re: [sqlite] [EXTERNAL] "Optional" incoming parameters for virtual tables

2019-04-18 Thread Hick Gunter
] "Optional" incoming parameters for virtual tables On Wed, 17 Apr 2019 at 15:08, Hick Gunter wrote: > ... > > SELECT contents from textfiles( 'mypath', NULL, 0); SELECT contents > from textfiles where search_path = 'mypath' and is_recursive = 1; > SLEECT contents from te

Re: [sqlite] [EXTERNAL] "Optional" incoming parameters for virtual tables

2019-04-17 Thread Max Vlasov
On Wed, 17 Apr 2019 at 15:08, Hick Gunter wrote: > > SLEECT contents from textfiles where search_path = 'mypath' and > name_pattern IN ('*.txt','*.csv'); > > It's interesting, I implemented the mask and decided to give such a query a try (having the same cost adjust I explained in the first

Re: [sqlite] [EXTERNAL] "Optional" incoming parameters for virtual tables

2019-04-17 Thread Max Vlasov
On Wed, 17 Apr 2019 at 15:08, Hick Gunter wrote: > ... > > SELECT contents from textfiles( 'mypath', NULL, 0); > SELECT contents from textfiles where search_path = 'mypath' and > is_recursive = 1; > SLEECT contents from textfiles where search_path = 'mypath' and > name_pattern IN

Re: [sqlite] [EXTERNAL] "Optional" incoming parameters for virtual tables

2019-04-17 Thread Hick Gunter
] Im Auftrag von Max Vlasov Gesendet: Mittwoch, 17. April 2019 13:03 An: SQLite mailing list Betreff: Re: [sqlite] [EXTERNAL] "Optional" incoming parameters for virtual tables On Wed, 17 Apr 2019 at 12:52, Hick Gunter wrote: > Your xBestIndex function should be ret

Re: [sqlite] [EXTERNAL] "Optional" incoming parameters for virtual tables

2019-04-17 Thread Max Vlasov
On Wed, 17 Apr 2019 at 12:52, Hick Gunter wrote: > Your xBestIndex function should be returning a cost that is proportional > to the "effort required to fulfill the query". My own VT implementations > have been returning the total number of records for queries with no > constraints and assuming

Re: [sqlite] [EXTERNAL] "Optional" incoming parameters for virtual tables

2019-04-17 Thread Hick Gunter
t Betreff: [EXTERNAL] [sqlite] "Optional" incoming parameters for virtual tables Hi, I'm trying to implement "optional incoming" parameters for my virtual tables. It's when there are columns required, but also there are some fine-tuning columns that should be noticed when provided