Re: [sqlite] Blob incremental i/o via Python

2008-02-14 Thread Samuel Neff
Thanks for the correction. Sam On Thu, Feb 14, 2008 at 6:19 PM, <[EMAIL PROTECTED]> wrote: > "Samuel Neff" <[EMAIL PROTECTED]> wrote: > > If the images you're storing are larger than the defined page size for > the > > database (which is most likely the case) then you can get better >

Re: [sqlite] Optimizing Query

2008-02-14 Thread BareFeet
Hi Nathan, > The problem gets into the multiple where fields in the where clause. > There could be up to 9 different where parameters. I could be wrong, but your statement above screams out that your database may not be "normalized". By this I mean that perhaps you have a lot of null values

Re: [sqlite] Blob incremental i/o via Python

2008-02-14 Thread Norman Young
On Thu, Feb 14, 2008 at 6:19 PM, <[EMAIL PROTECTED]> wrote: > "Samuel Neff" <[EMAIL PROTECTED]> wrote: > > If the images you're storing are larger than the defined page size for > the > > database (which is most likely the case) then you can get better > performance > > and reduced memory

Re: [sqlite] Blob incremental i/o via Python

2008-02-14 Thread drh
"Samuel Neff" <[EMAIL PROTECTED]> wrote: > If the images you're storing are larger than the defined page size for the > database (which is most likely the case) then you can get better performance > and reduced memory consumption by storing the images in the file system and > store only paths to

Re: [sqlite] Blob incremental i/o via Python

2008-02-14 Thread Samuel Neff
If the images you're storing are larger than the defined page size for the database (which is most likely the case) then you can get better performance and reduced memory consumption by storing the images in the file system and store only paths to the files in the database. This means reading the

Re: [sqlite] Blob incremental i/o via Python

2008-02-14 Thread Norman Young
On Wed, Feb 13, 2008 at 7:54 PM, Roger Binns <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Norman Young wrote: > > We had to exclude references to sqlite3_enable_load_extension and > > sqlite3_load_extension from within apsw.c, in order to avoid undefined > >

Re: [sqlite] SQL error: unrecognized token: "#"

2008-02-14 Thread Ken
Dennis, Thanks for the info. Regards, Ken Dennis Cote <[EMAIL PROTECTED]> wrote: Ken wrote: > The following errors out: > > CREATE TABLE users ( > user# INTEGER NOT NULL, > name VARCHAR(30) NOT NULL, > PRIMARY KEY (user#) > ) ; > >

Re: [sqlite] fts2 data in a different table

2008-02-14 Thread Scott Hess
On Tue, Feb 12, 2008 at 10:06 AM, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > I have various tables which all relate to the same central object, all > of them contain various pieces of information about this object. And I > want to full-text-search for these objects. > > I.e. in my

Re: [sqlite] sqlite3_column_type

2008-02-14 Thread Nicolas Williams
On Thu, Feb 14, 2008 at 02:42:16PM -0500, Igor Tandetnik wrote: > Michael Pitchford > <[EMAIL PROTECTED]> wrote: > > I'm having an issue with sqlite3_column_type in the current version > > of sqlite (3.5.6 at the time of this email). Unless I explicitly call > > sqlite3_step() on the statement,

Re: [sqlite] Optimizing Query

2008-02-14 Thread Dennis Cote
Nathan Biggs wrote: > I was hoping that someone could help me with optimizing this query. > Basically I need to return totals from an large database (> 1million > records in the table). There needs to be two different totals one by > "a" and one by "b" where "a" and "b" could have up to 100

Re: [sqlite] View update performance (was: Updatable views)

2008-02-14 Thread Steven Fisher
On 14-Feb-2008, at 12:27 PM, Stephen Oberholtzer wrote: > I'd love to know > what frame of mind I was in when I wrote it, because I'm pretty sure I > wouldn't have come up with the name 'MaterializeView' if I had tried > to write the patch today. Altered frames of mind are responsible for both

Re: [sqlite] Improved sorting algorithm (was: indexing)

2008-02-14 Thread Stephen Oberholtzer
On Wed, Feb 13, 2008 at 2:12 PM, <[EMAIL PROTECTED]> wrote: > > A project on our to-do list is to implement a new sorter > that uses O(1) seeks. We know how to do this. It is just > finding time to do the implementation. Do you have a link to a page or pdf describing the algorithm involved?

Re: [sqlite] View update performance (was: Updatable views)

2008-02-14 Thread Stephen Oberholtzer
On Thu, Feb 14, 2008 at 10:17 AM, Dennis Cote <[EMAIL PROTECTED]> wrote: > Stephen Oberholtzer wrote: > > Stephen, > > FYI, your ticket was fixed on Tuesday by checkin 4782 in case you hadn't > noticed. > > Dennis Cote > Wow, awesome! My claim to fame -- I submitted a patch to an open-source

Re: [sqlite] Optimizing Query

2008-02-14 Thread Stephen Oberholtzer
On Thu, Feb 14, 2008 at 2:26 PM, Nathan Biggs <[EMAIL PROTECTED]> wrote: > I was hoping that someone could help me with optimizing this query. > Basically I need to return totals from an large database (> 1million > records in the table). There needs to be two different totals one by > "a" and

Re: [sqlite] sqlite3_column_type

2008-02-14 Thread Igor Tandetnik
Michael Pitchford <[EMAIL PROTECTED]> wrote: > I'm having an issue with sqlite3_column_type in the current version > of sqlite (3.5.6 at the time of this email). Unless I explicitly call > sqlite3_step() on the statement, it returns SQLITE_NULL for every > column. Is this a bug or is it just how

[sqlite] sqlite3_column_type

2008-02-14 Thread Michael Pitchford
Hello All, I'm having an issue with sqlite3_column_type in the current version of sqlite (3.5.6 at the time of this email). Unless I explicitly call sqlite3_step() on the statement, it returns SQLITE_NULL for every column. Is this a bug or is it just how the sqlite3_column_type works now?

[sqlite] Optimizing Query

2008-02-14 Thread Nathan Biggs
I was hoping that someone could help me with optimizing this query. Basically I need to return totals from an large database (> 1million records in the table). There needs to be two different totals one by "a" and one by "b" where "a" and "b" could have up to 100 rows each. So totals for up

Re: [sqlite] SQL error: unrecognized token: "#"

2008-02-14 Thread Dennis Cote
Ken wrote: > The following errors out: > > CREATE TABLE users ( > user# INTEGER NOT NULL, > name VARCHAR(30) NOT NULL, > PRIMARY KEY (user#) > ) ; > > SQL error: unrecognized token: "#" > > It appears that $ is allowed, is there a

[sqlite] SQL error: unrecognized token: "#"

2008-02-14 Thread Ken
The following errors out: CREATE TABLE users ( user# INTEGER NOT NULL, name VARCHAR(30) NOT NULL, PRIMARY KEY (user#) ) ; SQL error: unrecognized token: "#" It appears that $ is allowed, is there a technical reason why # is ommitted from

Re: [sqlite] Function hex

2008-02-14 Thread Ken
The output of the native sqlite function "hex" is not really a hex value of a number. Its a hex representation of a string. select 5629701397680549, hex(5629701397680549) ; 5629701397680549|35363239373031333937363830353439 Where to_hex outputs: select 5629701397680549, to_hex(5629701397680549)

Re: [sqlite] Function hex

2008-02-14 Thread Mau Liste
Ken wrote: > Try using the attached hex.c function. You'll need to compile this as a .so > and call sqlite3_create_function to register it. > > Hth Thanks Ken. This is exactly what I need. Regards to all. Mau. ___ sqlite-users mailing list

Re: [sqlite] Function hex

2008-02-14 Thread Mau Liste
...ooops! I am "using" 3.5.5, but I was experimenting with an older SqliteSpy that was statically linked with 3.3.(something less than 13) Additionally I found that the function hex is not exactly what I want ... I need hex(128) -> 0x80 instead I have 313238 that is the conversion of the byte

Re: [sqlite] View update performance (was: Updatable views)

2008-02-14 Thread Dennis Cote
Stephen Oberholtzer wrote: > > If only you'd been around when I'd posted my message! Nobody said > *anything*, so I figured nobody else cared about it. > > I have reposted my mailing list message, with attachments, here: > http://www.sqlite.org/cvstrac/tktview?tn=2938 > > I have not updated the

Re: [sqlite] Function hex

2008-02-14 Thread Ken
Try using the attached hex.c function. You'll need to compile this as a .so and call sqlite3_create_function to register it. Hth Mau Liste <[EMAIL PROTECTED]> wrote: Hello all, I am trying to print some table values in hexadecimal. I've seen in the docs that there is a function called 'hex' but

Re: [sqlite] Function hex

2008-02-14 Thread drh
Mau Liste <[EMAIL PROTECTED]> wrote: > > results in: SQL error: no such function: hex > Added by version 3.3.13, one year ago yesterday. http://www.sqlite.org/releaselog/3_3_13.html What version are you running? -- D. Richard Hipp <[EMAIL PROTECTED]>

[sqlite] Function hex

2008-02-14 Thread Mau Liste
Hello all, I am trying to print some table values in hexadecimal. I've seen in the docs that there is a function called 'hex' but the following: create table aa (a integer); insert into aa values(10); insert into aa values(11); insert into aa values(12); insert into aa values(13); insert into aa

Re: [sqlite] creating a table with an index

2008-02-14 Thread BareFeet
Hi Sam, > I am trying to create a table with two indexes: > > CREATE TABLE favorites ( > cust_id CHAR(32) NOT NULL, > fldoid CHAR(38) NOT NULL, > imgoid CHAR(64) NOT NULL, > PRIMARY KEY (cust_id), > INDEX (fldoid, imgoid)); > > SQLite keeps complaining saying there is an error around