Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-16 Thread Dan Kennedy
On Aug 17, 2009, at 11:05 AM, John Machin wrote: > On 17/08/2009 11:41 AM, Shane Harrelson wrote: >> INDEXED BY doesn't allow you to specify which index to use. It >> just causes >> the query to fail if SQLite thinks it should use an index different >> then the >> one specified by the INDEXE

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-16 Thread John Machin
On 17/08/2009 11:41 AM, Shane Harrelson wrote: > INDEXED BY doesn't allow you to specify which index to use. It just causes > the query to fail if SQLite thinks it should use an index different then the > one specified by the INDEXED BY clause. Oh. The docs say "If index-name does not exist or ca

Re: [sqlite] debugging sqlite with gdb

2009-08-16 Thread D. Richard Hipp
On Aug 16, 2009, at 11:18 PM, Mohammad Reaz Uddin wrote: > can you please tell me how can i get a debuggable executable file? i > have > sqlite3.c(the single monolithic file) and sqlite3.h gcc -o sqlite3 -g -DSQLITE_THREADSAFE=0 sqlite3.c shell.c -ldl D. Richard Hipp d...@hwaci.com ___

Re: [sqlite] debugging sqlite with gdb

2009-08-16 Thread Mohammad Reaz Uddin
can you please tell me how can i get a debuggable executable file? i have sqlite3.c(the single monolithic file) and sqlite3.h sorry, my question are too naive. On Sun, Aug 16, 2009 at 4:47 PM, Miroslav Zagorac wrote: > > I downloaded 'sqlite-amalgamation-3.6.16.tar.gz' and used makefile to > > c

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-16 Thread Simon Slavin
On 17 Aug 2009, at 2:39am, Shane Harrelson wrote: > No. It only collects/updates stats when you explicitly call the > ANALYZE. > > On Sat, Aug 15, 2009 at 2:48 AM, Jim Showalter > wrote: > >> It doesn't collect those statistics automatically, as part of query >> plan optimization? Would pe

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-16 Thread Shane Harrelson
INDEXED BY doesn't allow you to specify which index to use. It just causes the query to fail if SQLite thinks it should use an index different then the one specified by the INDEXED BY clause. On Sun, Aug 16, 2009 at 7:59 PM, His Nerdship wrote: > > Hi Pavel, > > > Does INDEXED BY clause work fo

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-16 Thread Shane Harrelson
No. It only collects/updates stats when you explicitly call the ANALYZE. On Sat, Aug 15, 2009 at 2:48 AM, Jim Showalter wrote: > It doesn't collect those statistics automatically, as part of query > plan optimization? > > - Original Message - > From: "Dan Kennedy" > To: "General Discus

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-16 Thread His Nerdship
Hi Pavel, > Does INDEXED BY clause work for you? > http://www.sqlite.org/lang_select.html The page suggests that INDEXED BY can only be used in single-table queries. The report queries also join other smaller tables, some of them from an attached database, so I don't think this will work. Howev

Re: [sqlite] debugging sqlite with gdb

2009-08-16 Thread Miroslav Zagorac
> I downloaded 'sqlite-amalgamation-3.6.16.tar.gz' and used makefile to > compile it. > sqlite is a shell script, wrapper to a compiled binary in .libs directory. -- Zaga You have worked and not worked. Not working is the hardest work of all. ___ sq

Re: [sqlite] debugging sqlite with gdb

2009-08-16 Thread Mohammad Reaz Uddin
I downloaded 'sqlite-amalgamation-3.6.16.tar.gz' and used makefile to compile it. On Sun, Aug 16, 2009 at 12:54 PM, Kees Nuyt wrote: > On Sun, 16 Aug 2009 12:09:30 -0700, Mohammad Reaz Uddin > wrote: > > >can any body help? > > > >On Sat, Aug 15, 2009 at 10:00 AM, Mohammad Reaz Uddin > >wrote:

Re: [sqlite] debugging sqlite with gdb

2009-08-16 Thread Kees Nuyt
On Sun, 16 Aug 2009 12:09:30 -0700, Mohammad Reaz Uddin wrote: >can any body help? > >On Sat, Aug 15, 2009 at 10:00 AM, Mohammad Reaz Uddin >wrote: > >> Hey, >> I am running sqlite-3.6.16. I am getting segmentation fault and so trying >> to run sqlite with gdb. But I am getting following error- >

Re: [sqlite] debugging sqlite with gdb

2009-08-16 Thread Mohammad Reaz Uddin
can any body help? On Sat, Aug 15, 2009 at 10:00 AM, Mohammad Reaz Uddin wrote: > Hey, > I am running sqlite-3.6.16. I am getting segmentation fault and so trying > to run sqlite with gdb. But I am getting following error- > > /sqlite-3.6.16/sqlite3": not in executable format: File format not rec

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-16 Thread Pavel Ivanov
> Is there any way the code can 'suggest' SQLite use a certain index? Does INDEXED BY clause work for you? http://www.sqlite.org/lang_select.html Pavel On Sat, Aug 15, 2009 at 2:08 AM, His Nerdship wrote: > > Good day, > We have a puzzling problem with a large (1GB+) database. > Most of our que

Re: [sqlite] Table Exists Query

2009-08-16 Thread Pavel Ivanov
Why not make it this way: select 'database1', lists.* from database1.lists union all select 'database2', lists.* from database2.lists; This way you will know exactly which lists persist in which database. Pavel On Sat, Aug 15, 2009 at 10:57 AM, Andrew Gatt wrote: > Simon Slavin wrote: >> On 15

Re: [sqlite] SQLite locking problem with mozStorage

2009-08-16 Thread Simon Slavin
On 16 Aug 2009, at 11:55am, Sebastian Arcus wrote: > Just to thank you both for your suggestions and to let you know the > problem is solved. I'm glad you solved it, and thanks for your thanks. In a week like this one it's nice to know I'm doing someone some good somewhere. > I've tried you

Re: [sqlite] Question regarding SQLite btree structure

2009-08-16 Thread John Machin
On 16/08/2009 6:34 PM, deddy wahyudi wrote: > I am currently on a research project about SQLite btree data structure and I > have a simple question here. > > I need to retrieve in which offset SQLite keeps my record, for example : > > lets say I have 100 records kept in a table named "customer",

Re: [sqlite] SQLite locking problem with mozStorage

2009-08-16 Thread Sebastian Arcus
Hi Simon and Roger, Simon Slavin wrote: > On 15 Aug 2009, at 9:58am, Sebastian Arcus wrote: > > >> I've just noticed another interesting thing. A read operation after a >> write on same table (like a SELECT statement after an INSERT) works >> perfectly fine - instantly. Which is bizarre, as I w

[sqlite] Question regarding SQLite btree structure

2009-08-16 Thread deddy wahyudi
Hi all, I am currently on a research project about SQLite btree data structure and I have a simple question here. I need to retrieve in which offset SQLite keeps my record, for example : lets say I have 100 records kept in a table named "customer", with three fields, namely "id", "name" and "add