Re: [sqlite] Ideas or Guide on SQLite Search Engine for a relational database?

2019-01-20 Thread Domingo Alvarez Duarte
Hello Scoott ! I have done some work with a prototyping tool for data applications using sqlite https://github.com/mingodad/db-api-server and use for navigate several opendata sources like (sorry it is in Spainsh) https://meimporta.eu look here https://borme.w.meimporta.eu/bormeMalaga-lm.app

Re: [sqlite] Ideas or Guide on SQLite Search Engine for a relational database?

2019-01-20 Thread Andy Goth
You can try reading the Fossil source code to see how it handles full-text searching across multiple tables. https://fossil-scm.org/index.html/artifact?fn=src/search.c&ci=trunk On Sat, Jan 19, 2019, 06:10 Scott > I apologize, I sent this from a different email than I registered > accidentally. >

[sqlite] Ideas or Guide on SQLite Search Engine for a relational database?

2019-01-19 Thread Scott
I apologize, I sent this from a different email than I registered accidentally. Hi Everyone! The Ask and what I’ve done: I'm building a research database with an embedded SQLite DB using Intellij for development. I've created the data entry point for the users; however, I'm looking for anything

Re: [sqlite] Search % using sqlite

2018-01-05 Thread Hegde, Deepakakumar (D.)
From: sqlite-users on behalf of R Smith Sent: Friday, January 5, 2018 3:41:35 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] Search % using sqlite On 2018/01/05 10:14 AM, Rowan Worth wrote: > For this simple search it's easier to replace "NAME

Re: [sqlite] Search % using sqlite

2018-01-05 Thread R Smith
On 2018/01/05 10:14 AM, Rowan Worth wrote: For this simple search it's easier to replace "NAME LIKE ?" with "instr(NAME, ?) > 0", unless you need case insensitive matching. And in case you do wish for Case-Insensitive matching while using Rowan's method... "instr(UPPER(NAME), UPPER(?)) > 0"

Re: [sqlite] Search % using sqlite

2018-01-05 Thread Rowan Worth
Firstly this code is extremely dangerous. What would happen if acInputString contained this string? ';DROP TABLE AUDIO; SELECT ' It's best practice to use bound parameters to prevent this kind of problem, ie. sqlite3_prepare(db, "SELECT NAME FROM AUDIO WHERE NAME LIKE ?", -1, &stmt, NULL); sprin

[sqlite] Search % using sqlite

2018-01-04 Thread Hegde, Deepakakumar (D.)
Hi All, We are implementing a wild card search feature. our query is as below: sprintf (acQstring, "SELECT NAME FROM AUDIO WHERE NAME LIKE '%%%s%%'", acInputString); In the input string is '%' then we are getting t all the entry in the column. ex: name column have following: %a a a%a

Re: [sqlite] Search semantics with a virtual table?

2017-04-03 Thread Hick Gunter
clause, so that SQLIte will not attempt to read more than 1 record. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Deon Brewis Gesendet: Montag, 03. April 2017 15:52 An: SQLite mailing list Betreff: [sqlite] Search semantics

[sqlite] Search semantics with a virtual table?

2017-04-03 Thread Deon Brewis
How do I convince SQLITE to give me SEARCH semantics over a virtual table instead of SCAN semantics? e.g. I have: explain query plan SELECT * FROM vtable WHERE value = 12345 0 | 0 | 0 | SCAN TABLE vtable VIRTUAL TABLE INDEX 1: And I'm returning in xBestIndex: pIdxInfo->idxNum = 1; pIdxIn

Re: [sqlite] Search for text in all tables

2014-12-05 Thread Max Vlasov
>> I once implemented a virtual table "allvalues" that outputs all >> database values with (hope self-explaining) fields >> >> TableName, TableRowId, FieldName, Value > > Could you expand on how you coped with the underlying database > changing, and how you mapped virtual table rowids to the actual

Re: [sqlite] Search for text in all tables

2014-12-05 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/05/2014 01:24 AM, Max Vlasov wrote: > I once implemented a virtual table "allvalues" that outputs all > database values with (hope self-explaining) fields > > TableName, TableRowId, FieldName, Value Could you expand on how you coped with the u

Re: [sqlite] Search for text in all tables

2014-12-05 Thread Dominique Devienne
On Fri, Dec 5, 2014 at 10:24 AM, Max Vlasov wrote: > Not particularity the answer to your question, but rather a method you > or others might use. > I once implemented a virtual table "allvalues" that outputs all > database values with (hope self-explaining) fields > > TableName, TableRowId, Fi

Re: [sqlite] Search for text in all tables

2014-12-05 Thread Max Vlasov
On Thu, Dec 4, 2014 at 10:44 AM, Baruch Burstein wrote: > > Is it possible to somehow search for/replace a string in all columns of all > tables? > Not particularity the answer to your question, but rather a method you or others might use. I once implemented a virtual table "allvalues" that outpu

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Petite Abeille
> On Dec 4, 2014, at 10:26 PM, Roger Binns wrote: > > That will only work under the simplest of cases. Simplicity first and foremost. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/04/2014 11:59 AM, Petite Abeille wrote: >> On Dec 4, 2014, at 8:44 AM, Baruch Burstein >> wrote: >> >> Is it possible to somehow search for/replace a string in all >> columns of all tables? > > .dump | sed ’s/old/new/g' | .read ? That will on

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Petite Abeille
> On Dec 4, 2014, at 8:44 AM, Baruch Burstein wrote: > > Is it possible to somehow search for/replace a string in all columns of all > tables? .dump | sed ’s/old/new/g' | .read ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/03/2014 11:44 PM, Baruch Burstein wrote: > Is it possible to somehow search for/replace a string in all > columns of all tables? (Disclosure: I am the APSW author) The APSW shell includes a .find command that does the searching bit. You also ge

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Paul Sanderson
Had 5 mins waiting for a conference call so knocked this bit of Python up. No debugging, comments or testing (other than one run on a test db) import sqlite3 import tkinter import tkinter.filedialog root = tkinter.Tk() root.withdraw() fileName = tkinter.filedialog.askopenfilename(parent=root, ti

Re: [sqlite] Search for text in all tables

2014-12-04 Thread J T
replace) failed // you may want to catch different exceptions } -Original Message- From: Dominique Devienne To: General Discussion of SQLite Database Sent: Thu, Dec 4, 2014 6:57 am Subject: Re: [sqlite] Search for text in all tables On Thu, Dec 4, 2014 at 11:45 AM

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Paul Sanderson
As above I use pragma table_info tablename then you can loop through each row and check the type column to see if it is text Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolki

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Dominique Devienne
On Thu, Dec 4, 2014 at 11:45 AM, Baruch Burstein wrote: > On Thu, Dec 4, 2014 at 12:18 PM, Paul Sanderson < > > If you are a coder then it is a relatively straight forward process > > Loop through each table > >Loop through each column > > This is the part I am having trouble with. I can loop

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Martin Engelschalk
Hi Baruch, in such cases I do a sqlite3_prepare_v2 on "select * from mytable LIMIT 1" and get the column names using sqlite3_column_count and sqlite3_column_name. Martin Am 04.12.2014 11:45, schrieb Baruch Burstein: On Thu, Dec 4, 2014 at 12:18 PM, Paul Sanderson < sandersonforens...@gmail.c

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Baruch Burstein
On Thu, Dec 4, 2014 at 12:18 PM, Paul Sanderson < sandersonforens...@gmail.com> wrote: > If you are a coder then it is a relatively straight forward process > along the lines of > > Loop through each table >Loop through each column > This is the part I am having trouble with. I can loop throu

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Paul Sanderson
Hi Baruch I have a commercial tool that can do the search all tables bit but not the replacing :) (not usually required by my clients - although I may add it) If you are a coder then it is a relatively straight forward process along the lines of Loop through each table Loop through each colum

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Martin Engelschalk
Hi Baruch, no, not with SQL as I know it. Perhaps you can .dump and .output the database to a text file using sqlite3 command shell, replace your text and then create the database from the SQL using .read. HTH Martin Am 04.12.2014 08:44, schrieb Baruch Burstein: Hi, Is it possible to some

[sqlite] Search for text in all tables

2014-12-03 Thread Baruch Burstein
Hi, Is it possible to somehow search for/replace a string in all columns of all tables? Thanks -- ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/

Re: [sqlite] Search query alternatives.

2014-10-17 Thread Michael Falconer
I am glad I posted the question. Yes James, there is little I can disagree with in your excellent summary. Even the critique of my perhaps poorly framed question is indeed valid. I take your point regarding spec vs implementation, and in my experience across different rdbms's I have frequently see

Re: [sqlite] Search query alternatives.

2014-10-17 Thread James K. Lowden
On Thu, 16 Oct 2014 09:05:51 +1100 Michael Falconer wrote: > we just wonder if there is a better way to perform this search in > SQL. Is there a general technique which is superior either in speed, > efficiency or load bearing contexts? The simple answer is No, because SQL is a specification, no

Re: [sqlite] Search query alternatives.

2014-10-16 Thread GB
Michael, a Guy named Joe Celko elaborated about trees and hierarchies in SQL a few years ago. Have a look here: http://www.amazon.com/Hierarchies-Smarties-Edition-Kaufmann-Management/dp/0123877334/ref=dp_ob_title_bk regards gerd ___ sqlite-users ma

Re: [sqlite] Search query alternatives.

2014-10-16 Thread Michael Falconer
Thanks Eduardo, a most interesting link. On 17 October 2014 05:41, Eduardo Morras wrote: > On Thu, 16 Oct 2014 09:05:51 +1100 > Michael Falconer wrote: > > > Hi all, > > > > first off I must start with an apology. I know I'm sort of doing the > > wrong thing here as this question is NOT relate

Re: [sqlite] Search query alternatives.

2014-10-16 Thread Eduardo Morras
On Thu, 16 Oct 2014 09:05:51 +1100 Michael Falconer wrote: > Hi all, > > first off I must start with an apology. I know I'm sort of doing the > wrong thing here as this question is NOT related to sqlite. It is a > general SQL question but I ask it here because I have great respect > for the answ

Re: [sqlite] Search query alternatives.

2014-10-15 Thread Michael Falconer
Thanks Stephen, good point, I was just after some general results, I do take your point about caching etc. However it is logical to apply UNION ALL if appropriate in preference to UNION which in this context is a bit lazy. I'm a bit annoyed I didn't pick up on it myself, but thankful to Igor for r

Re: [sqlite] Search query alternatives.

2014-10-15 Thread Stephen Chrzanowski
Careful with the timing. You may be looking at OS memory caching the result set instead of pulling from the drive. For best bets, either re-run both queries several times, ditch the longest and shortest times, then take the mean or average times and do the comparison that way. On Wed, Oct 15, 20

Re: [sqlite] Search query alternatives.

2014-10-15 Thread Michael Falconer
Igor, Nice one. A quick test using 10 lookup trees and the same search criteria: *Showing rows 0 - 29 (30 total, Query took 0.4838 sec)* Now with UNION ALL replacing UNION: *Showing rows 0 - 29 (30 total, Query took 0.2050 sec)* You weren't kidding about cheaper were you? LOL On 16 October 201

Re: [sqlite] Search query alternatives.

2014-10-15 Thread Michael Falconer
Yes, I agree with the general sentiment. It is not exactly the design I would have chosen either, but it is what exists. Design change is occurring but for the moment we are stuck with the current schema. If you cannot change the schemata to be more suitable, then your > demonstrated queries are v

Re: [sqlite] Search query alternatives.

2014-10-15 Thread RSmith
On 2014/10/16 00:05, Michael Falconer wrote: Hi all, first off I must start with an apology. I know I'm sort of doing the wrong//... No need to apologise, this flies quite close to the central theme. Whether you are using SQLite or any other SQL RDBMS, this is horrible DB design and it is so

Re: [sqlite] Search query alternatives.

2014-10-15 Thread Igor Tandetnik
On 10/15/2014 6:05 PM, Michael Falconer wrote: addresses connections events family person repositories sources texts Personally, I'd have one set of tables, each with an extra column containing . Why do you need a separate set of tables, only to UNION them on every request? Instead of shardin

[sqlite] Search query alternatives.

2014-10-15 Thread Michael Falconer
Hi all, first off I must start with an apology. I know I'm sort of doing the wrong thing here as this question is NOT related to sqlite. It is a general SQL question but I ask it here because I have great respect for the answers and discussions I have seen on this forum over many years. I rarely p

Re: [sqlite] search string in the db question

2013-02-07 Thread Yongil Jang
Select * from mytable where c5 like '9806067880' OR c6 like '9806067880' OR c7 like '9806067880'; AFAIK, like function should called for each column. Regards, Yongil Jang. 2013/2/8 YAN HONG YE > my table has a table like this: > c5 c6 c7 > 9806062380 9806062380 9806062380

Re: [sqlite] search string in the db question

2013-02-07 Thread Igor Tandetnik
On 2/8/2013 12:08 AM, YAN HONG YE wrote: my table has a table like this: c5 c6 c7 9806062380 9806062380 9806062380 9806062480 9806062680 9806062680 9806063280 9806068980 9806068980 9806062980 9806067980 9806067980 9806062280 9806067880 9

[sqlite] search string in the db question

2013-02-07 Thread YAN HONG YE
my table has a table like this: c5 c6 c7 9806062380 9806062380 9806062380 9806062480 9806062680 9806062680 9806063280 9806068980 9806068980 9806062980 9806067980 9806067980 9806062280 9806067880 9806067880 9806734080 9806068280 9

Re: [sqlite] search

2012-01-03 Thread Alek Paunov
_ From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Durga D [durga.d...@gmail.com] Sent: Tuesday, December 27, 2011 4:27 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] search Thank you. I agree. It's correct. I already have data base

Re: [sqlite] search

2012-01-02 Thread Aris Setyawan
#x27;ST','state1'); >> >> >> >> INSERT INTO virfts4 VALUES(1,'CI','city1'); >> >> >> >> INSERT INTO virfts4 VALUES(1,'VI','village1'); >> >> >> >> SELECT DISTINCT value FROM

Re: [sqlite] search

2012-01-01 Thread Durga D
LUES(1,'VI','village1'); > >> > >> SELECT DISTINCT value FROM virfts4 WHERE level MATCH 'CO'; > >> > >> > >> > >> You can store as many levels as you want. > >> > >> > >> > >> Micha

Re: [sqlite] search

2011-12-30 Thread Aris Setyawan
27;village1'); >> >> SELECT DISTINCT value FROM virfts4 WHERE level MATCH 'CO'; >> >> >> >> You can store as many levels as you want. >> >> >> >> Michael D. Black >> >> Senior Scientist >> >> Advanced Analytics Di

Re: [sqlite] search

2011-12-27 Thread Durga D
ou want. > > > > Michael D. Black > > Senior Scientist > > Advanced Analytics Directorate > > Advanced GEOINT Solutions Operating Unit > > Northrop Grumman Information Systems > > > From: sqlite-users-boun...@sqlite.org [sqlite-use

Re: [sqlite] search

2011-12-27 Thread Durga D
Mohit, sqlite> .separator / sqlite> create virtual table virfts4 using fts4 (residence); sqlite> insert into virfts4 select * from source sqlite> select count(*) from virfts4 where residence match '/*'; -- result is 0. Please correct it. I think, i am doing somet

Re: [sqlite] search

2011-12-27 Thread Black, Michael (IS)
rga D [durga.d...@gmail.com] Sent: Tuesday, December 27, 2011 4:27 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] search Thank you. I agree. It's correct. I already have data base with /country/state/city/village format. Is it possible to do that while virtual table c

Re: [sqlite] search

2011-12-27 Thread Eduardo Morras
At 15:10 27/12/2011, Mohit Sindhwani wrote: On 27/12/2011 9:25 PM, Eduardo Morras wrote: At 11:27 27/12/2011, you wrote: Thank you. I agree. It's correct. I already have data base with /country/state/city/village format. Is it possible to do that while virtual table creation time? if yes, how

Re: [sqlite] search

2011-12-27 Thread Mohit Sindhwani
On 27/12/2011 9:25 PM, Eduardo Morras wrote: At 11:27 27/12/2011, you wrote: Thank you. I agree. It's correct. I already have data base with /country/state/city/village format. Is it possible to do that while virtual table creation time? if yes, how? Change '/' to ','. This way you get a csv

Re: [sqlite] search

2011-12-27 Thread Eduardo Morras
At 11:27 27/12/2011, you wrote: Thank you. I agree. It's correct. I already have data base with /country/state/city/village format. Is it possible to do that while virtual table creation time? if yes, how? Change '/' to ','. This way you get a csv file which you can import directly. Perhaps

Re: [sqlite] search

2011-12-27 Thread Durga D
Thank you. I agree. It's correct. I already have data base with /country/state/city/village format. Is it possible to do that while virtual table creation time? if yes, how? in case, if I have 250 levels like this ex: file system. how to do this. any idea? Thanks in advance. On Tue, Dec 27, 20

Re: [sqlite] search

2011-12-27 Thread Kit
2011/12/27 Durga D : > select * from virfts4 where residence match '/*'; -- dint work > how to get counties names from this db by using query? Normalize database to 1NF, e.g. CREATE VIRTUAL TABLE virfts4 using fts4(country, state, city, village, arrivtime, duration, imagelocation); INSERT INTO vir

Re: [sqlite] search

2011-12-27 Thread Durga D
Hi kit, Thanks for your response. CREATE VIRTUAL TABLE virfts4 using fts4(residence, arrivtime, duration, imagelocation); insert into virfts4 values('/country1/state1/city1/village1', 0730, 1500, 'C'); insert into virfts4 values('/country1/state1/city1/village2', 0731, 1500, 'C'); insert into

Re: [sqlite] search

2011-12-27 Thread Kit
2011/12/27 Durga D : > HI all, >   I have sqlite database with more than 1000 records. Here, > residencearea is the primary key. > /country/state/city/village >   I tried with fts3 and fts4 virtual tables. Not much performance. >   like query on direct table, dead slow. Send your SQL query and

[sqlite] search

2011-12-26 Thread Durga D
HI all, I have sqlite database with more than 1000 records. Here, residencearea is the primary key. for ex: /country/state/city/village /country/city /country/state/city /country/ country: USA, UK, CHINA Here I want to search based on country and sometimes

Re: [sqlite] Search optimization questions

2011-12-13 Thread Igor Tandetnik
Igor Tandetnik wrote: > But at one point, Mr. Hipp chimed in Sorry, it's Dr. Hipp. Shame on me. -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Search optimization questions

2011-12-13 Thread Igor Tandetnik
Simon Slavin wrote: > 1) My index does not specifically involve ordering the entries in 'id' order. > But entries in the table are always entered > chronologically. Am I right that SQLite implicitly adds the rowid into every > index to keep entries unique ? Not so much to keep them unique, bu

[sqlite] Search optimization questions

2011-12-13 Thread Simon Slavin
This is simplified from what I'm really doing and I'm having to type this from memory, but I hope I've preserved enough that you can give the right answer. I keep a log of changes made. It looks like this: CREATE TABLE changes ( id INTEGER PRIMARY KEY, dateTime TEXT, th

[sqlite] SQLite search using IN clause

2011-05-14 Thread Trevor Borgmeier
I have a database where a field's value is a comma separated list indicating the basic categories the item belongs to. so if the "categories" field has a value of "1,8,15" I want to do a query like this: SELECT categories FROM myTable WHERE "8" IN (categories); but it only finds records where

Re: [sqlite] Search multiple columns AND extra coparator

2010-04-25 Thread flakpit
Igor Tandetnik wrote: > > > Define "didn't work". What results did this query return, and how do these > results differ from your expectations? > >> it is not giving me any results at the moment. > > Well, do you actually have any records that match all the conditions? Show > a sample of you

Re: [sqlite] Search multiple columns AND extra coparator

2010-04-25 Thread Igor Tandetnik
flakpit wrote: >> SELECT * FROM sitelist >> WHERE > sitename||username||password||serialnum||misc1||misc2||misc3||misc4||misc5||notes > LIKE >'%wik%' >> AND category='Bundled Software' >> AND owner='Gary' >> ORDER BY sitename > > Hello Simon, that's what I tried first (yes, the '7' was a typo, sor

Re: [sqlite] Search multiple columns AND extra coparator

2010-04-25 Thread flakpit
>Just add your AND and ORDER by clauses on after the '%wik%'. But I don't know why there's a '7' at >the end of your original line. I don't think it does anything. Perhaps a typo when you made the post ? >SELECT * FROM sitelist >WHERE sitename||username||password||serialnum||misc1||misc2||misc

Re: [sqlite] Search multiple columns AND extra coparator

2010-04-25 Thread Simon Slavin
On 25 Apr 2010, at 2:44pm, flakpit wrote: > Using the first part of this query works fine to return data by searching > the multiple concatenated columns, very happy with that. > > SELECT * FROM sitelist > WHERE > sitename||username||password||serialnum||misc1||misc2||misc3||misc4||misc5||notes

[sqlite] Search multiple columns AND extra coparator

2010-04-25 Thread flakpit
Hello folks, sorry to bother you. You must admit I take 6 months or more to ask questions:):) Using the first part of this query works fine to return data by searching the multiple concatenated columns, very happy with that. SELECT * FROM sitelist WHERE sitename||username||password||serialnum||

Re: [sqlite] Search a Select in another Select

2009-09-01 Thread Terence Lorenzo
yes I am aware of that. word and word1 are variables in my case. I didnt wish to create confusion so I appreciate the comment cheers Igor Tandetnik wrote: > > Terence Lorenzo wrote: >> select K1.keyword >> from emaildata as E1 >> INNER JOIN keylocations AS L1 on L1.id_unique = E1.id_unique >>

Re: [sqlite] Search a Select in another Select

2009-09-01 Thread Igor Tandetnik
Terence Lorenzo wrote: > select K1.keyword > from emaildata as E1 > INNER JOIN keylocations AS L1 on L1.id_unique = E1.id_unique > INNER JOIN keywords as K1 on K1.id = L1.id_keyword > WHERE K1.keyword LIKE '%word%' or K1.keyword LIKE '%word2%' The second test is redundant. Everything that matc

Re: [sqlite] Search a Select in another Select

2009-08-31 Thread Terence Lorenzo
Thanks for the help. I suspected I had to use a secondary select, though I want sure how to use it For others, here is the completed sql select E1.datetime,R1.email,R2.email,subject,E1.[size],E1.offset,C1.id_block,C1.[size],C1.compression,C1.offset from ( select distinct E2.id from emaildata

Re: [sqlite] Search a Select in another Select

2009-08-31 Thread Darren Duncan
Terence Lorenzo wrote: > I have these 2 queries > > select K1.keyword > from emaildata as E1 > INNER JOIN keylocations AS L1 on L1.id_unique = E1.id_unique > INNER JOIN keywords as K1 on K1.id = L1.id_keyword >WHERE K1.keyword LIKE '%word%' or K1.keyword LIKE '%word2%' > > This qu

[sqlite] Search a Select in another Select

2009-08-31 Thread Terence Lorenzo
I have these 2 queries select K1.keyword from emaildata as E1 INNER JOIN keylocations AS L1 on L1.id_unique = E1.id_unique INNER JOIN keywords as K1 on K1.id = L1.id_keyword WHERE K1.keyword LIKE '%word%' or K1.keyword LIKE '%word2%' This query finds all matching keywords select

Re: [sqlite] search time is non-determinate in multi-thread enviroment

2009-07-30 Thread Lawrence Gold
On Jul 28, 2009, at 8:09 PM, pierr wrote: > http://www.sqlite.org/threadsafe.html > "Multi-thread. In this mode, SQLite can be safely used by multiple > threads > provided that no single database connection is used simulataneously > in two > or more threads." > > If I have one(different) conne

Re: [sqlite] search time is non-determinate in multi-thread enviroment

2009-07-28 Thread pierr
Jay A. Kreibich-2 wrote: > > > THREADSAFE=1 is "Serialize mode" and THREADSAFE=2 is "Multithread" > mode. THREADSAFE=2 (basic Multithread) actually offers less protection, > requiring the application to provide its own locks to prevent multiple > threads from accessing the DB at the sa

Re: [sqlite] search time is non-determinate in multi-thread enviroment

2009-07-28 Thread pierr
Igor Tandetnik wrote: > > pierr wrote: >> Hi, >> My sqlite is configure as serialized (THREADSAFE=1). My application >> has only one connection but it is shared by two thread. One thread >> will do insert/update/delete in the background , another thread will >> do the select upon request of th

Re: [sqlite] search time is non-determinate in multi-thread enviroment

2009-07-28 Thread Jay A. Kreibich
On Tue, Jul 28, 2009 at 07:59:23AM -0400, Igor Tandetnik scratched on the wall: > pierr wrote: > > Any insight? Should I go with THREADSAFE=2 and two connections: one > > for read ,another for write? Thanks. > > THREADSAFE is not a number of allowed concurrent threads. It's a boolean > switch -

Re: [sqlite] search time is non-determinate in multi-thread enviroment

2009-07-28 Thread Igor Tandetnik
pierr wrote: > Hi, > My sqlite is configure as serialized (THREADSAFE=1). My application > has only one connection but it is shared by two thread. One thread > will do insert/update/delete in the background , another thread will > do the select upon request of the user from gui. > Typically, we

Re: [sqlite] search time is non-determinate in multi-thread enviroment

2009-07-28 Thread pierr
pierr wrote: > > Hi, >My sqlite is configure as serialized (THREADSAFE=1). My application has > only one connection but it is shared by two thread. One thread will do > insert/update/delete in the background , another thread will do the select > upon request of the user from gui. > Typic

[sqlite] search time is non-determinate in multi-thread enviroment

2009-07-28 Thread pierr
Hi, My sqlite is configure as serialized (THREADSAFE=1). My application has only one connection but it is shared by two thread. One thread will do insert/update/delete in the background , another thread will do the select upon request of the user from gui. Typically, we will call following f

Re: [sqlite] search in archive

2009-06-19 Thread John Machin
On 20/06/2009 3:56 AM, Rizzuto, Raymond wrote: > Is it possible to have a search feature for the archive? I.e. rather than > having to do a linear search through 18 archives for an answer to a question, > have a google-like search across all of the archives? http://search.gmane.org/ In the box

Re: [sqlite] search in archive

2009-06-19 Thread Rizzuto, Raymond
via http://sqlite.org:8080/cgi-bin/mailman/private/sqlite-users/, which doesn't have that functionality. -Original Message- From: Swithun Crowe [mailto:swit...@swithun.servebeer.com] Sent: Friday, June 19, 2009 3:16 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] search in ar

Re: [sqlite] search in archive

2009-06-19 Thread Adam DeVita
The link I posted (http://www.mail-archive.com/sqlite-users%40sqlite.org/) only goes back to March 10, 2009 It searches well but is currently incomplete. Will it be expanded to include older posts? http://sqlite.org:8080/cgi-bin/mailman/private/sqlite-users/ goes back much further, but searching

Re: [sqlite] search in archive

2009-06-19 Thread Swithun Crowe
Hello KN On Fri, 19 Jun 2009 13:56:52 -0400, "Rizzuto, Raymond" KN wrote: KN KN > Is it possible to have a search feature for the KN > archive? KN KN Which archive? I think Raymond means the sqlite-users archive. You could download all the txt.gz files, cat them together and then grep for w

Re: [sqlite] search in archive

2009-06-19 Thread Adam DeVita
There is a search of archives at http://www.mail-archive.com/sqlite-users%40sqlite.org/ On Fri, Jun 19, 2009 at 2:43 PM, Kees Nuyt wrote: > On Fri, 19 Jun 2009 13:56:52 -0400, "Rizzuto, Raymond" > wrote: > > > Is it possible to have a search feature for the > > archive? > > Which archive? > >

Re: [sqlite] search in archive

2009-06-19 Thread Kees Nuyt
On Fri, 19 Jun 2009 13:56:52 -0400, "Rizzuto, Raymond" wrote: > Is it possible to have a search feature for the > archive? Which archive? I'll assume you have 18 different databases and you want to search them in parallel. > I.e. rather than having to do a linear > search through 18 archives

[sqlite] search in archive

2009-06-19 Thread Rizzuto, Raymond
Is it possible to have a search feature for the archive? I.e. rather than having to do a linear search through 18 archives for an answer to a question, have a google-like search across all of the archives? Ray Rizzuto raymond.rizz...@sig.com Susquehanna Interna

Re: [sqlite] Search in multiple fields.

2009-06-05 Thread Jay A. Kreibich
On Fri, Jun 05, 2009 at 10:53:58AM -0400, German Escallon scratched on the wall: > Say I have the following record in my DB: > > Path: /home/media/mymusic > filename: rock_my_world > extension: mp3 > > I want to be able to find this file by typing any of the following in > the user interface tha

Re: [sqlite] Search in multiple fields.

2009-06-05 Thread Alexandre Courbot
Hi, Not sure if that answers your question, but I think you seriously want to use FTS3. It will be both a trillion times faster than your current query - you may have trouble with your last example though. Maybe you can still go through by escaping the search terms. http://www.sqlite.org/cvstrac/

[sqlite] Search in multiple fields.

2009-06-05 Thread German Escallon
Hello all, I have a table with file information (path, filename, extension, size, etc), and I would like to enable search on this table based on different fields with a single input, and/or concatenation of the same. For example.. Say I have the following record in my DB: Path: /home/media/mymus

Re: [sqlite] search time in FTS3 tables sometimes very long

2007-12-10 Thread Scott Hess
BTW, http://www.sqlite.org/cvstrac/chngview?cn=4599 is the final fix to this. It's different from the patch I posted. The patch did the job, but felt wrong to me. This has the same performance characteristics, but feels ... well, less wrong. This change should apply cleanly to fts2.c, if anyone

Re: [sqlite] search time in FTS3 tables sometimes very long

2007-12-05 Thread Ingo Godau-Gellert
Hi Scott! You're great! I checked the attached modification and found no search taking longer than 20s now! It's a great improvement. I didn't find any other problems, so I will leave the modification in my FTS3 compilation. Many thanks! Ingo Scott Hess schrieb: 2007/12/4 Scott Hess <[EMA

Re: [sqlite] search time in FTS3 tables sometimes very long

2007-12-04 Thread Scott Hess
2007/12/4 Scott Hess <[EMAIL PROTECTED]>: > This seems a little excessive, though. I do see that there's an > O(N^2) path in the prefix-searching (loadSegmentLeavesInt()'s call to > docListUnion()). I can reasonably make that O(logN), which might help > a great deal, if you're hitting it. Not re

Re: [sqlite] search time in FTS3 tables sometimes very long

2007-12-04 Thread Scott Hess
2007/12/4 Ingo Godau-Gellert <[EMAIL PROTECTED]>: > What is really strange is that FTS3 search phrases like > SELECT referenzcode FROM volltext where volltext match ('installation > manual') are performed really fast within some milliseconds, independent > to the search phrase. > But in general I a

[sqlite] search time in FTS3 tables sometimes very long

2007-12-04 Thread Ingo Godau-Gellert
f every phrase, independent to length of the phrase, takes max. 55 seconds only (after first call; every further search is performed in max. 10 seconds as the table seems to be in cache then). Unfortunately this standard search is finding every entry containing the search phrase, not only the

[sqlite] search multiple files

2007-06-23 Thread gecko
Hi, I need to write a script that searches multiple db files (made with SQLite) for a text string. How can I do this? -- View this message in context: http://www.nabble.com/search-multiple-files-tf3971138.html#a11272075 Sent from the SQLite mailing list archive at Nabble.com.

RE: [sqlite] Search on Age, from DOB column

2007-05-03 Thread Allan, Mark
Thanks to everybody that contirbuted to this thread. I have now implemented this functionality and it works well. DISCLAIMER: This information and any attachments contained in this email message is intended only for the use of the individual or entity to which it is addressed and may contain i

RE: [sqlite] Search on Age, from DOB column

2007-05-03 Thread Samuel R. Neff
ng a passionate developer to join our team building products. Position is in the Washington D.C. metro area. If interested contact [EMAIL PROTECTED] -Original Message- From: Allan, Mark [mailto:[EMAIL PROTECTED] Sent: Thursday, May 03, 2007 6:57 AM To: sqlite-users@sqlite.org Subject: [sqlite

Re: [sqlite] Search on Age, from DOB column

2007-05-03 Thread Pix
Allan, Mark wrote: Hi, I need to be able offer the user the ability to search for patients in the database based on age. i.e. age > 17 or age = 45 etc etc... I only store the patient DOB in the database however, what is the SQL to achive this? Can I subract todays date from the DOB and get th

RE: [sqlite] Search on Age, from DOB column

2007-05-03 Thread RB Smissaert
"strftime('%Y', 'now') - strftime('%Y', " & strField & ") -1 End" & _ strAS & strAlias End Function You may not be coding in VB, but you will get the idea. RBS -Original Message

[sqlite] Search on Age, from DOB column

2007-05-03 Thread Allan, Mark
Hi, I need to be able offer the user the ability to search for patients in the database based on age. i.e. age > 17 or age = 45 etc etc... I only store the patient DOB in the database however, what is the SQL to achive this? Can I subract todays date from the DOB and get the number of years wit

Re: [sqlite] Search engines and the Sqlite.Org website

2007-03-18 Thread Joe Wilson
I noticed that one of the sqlite contrib files had 1500 downloads in a single day this past week, which is around 100X normal. I'm guessing it was a robot. I see that Google and many other websites' robots.txt prefer this form: Disallow: /contrib/download/ over this form: Disallow: /contri

Re: [sqlite] Search engines and the Sqlite.Org website

2007-03-16 Thread John Stanton
Why are you surprised? No doubt they are trying to do the job with Microsoft quality control and software. [EMAIL PROTECTED] wrote: I was looking into the server logs and I discovered a curious difference between MSN and Google. Over the past 7 days, the MSN bot has visited www.sqlite.org 114

  1   2   >