Re: [sqlite] Overhead of indexes?

2009-07-22 Thread Simon Slavin
On 23 Jul 2009, at 2:20am, Jim Showalter wrote: > The query looks like this: > > select distinct * from tbl where a <> 0 order by a desc, b desc, c > desc, d desc limit 2; > > where a, b, c, and d are all type INTEGER. To add to Igor's point, how much use an index is varies depending on how

Re: [sqlite] Overhead of indexes?

2009-07-22 Thread Igor Tandetnik
Jim Showalter wrote: > What is the overhead in O notation for adding an index to a column in > SQLite? You mean size overhead? O(n): the index is basically just another table (usually with fewer columns than the original). There's one record in the index for every record

[sqlite] Overhead of indexes?

2009-07-22 Thread Jim Showalter
I have everything working now, and am just tidying up. I want to add indexes, if needed, but this is for a cellphone app, and I'm worried about using up space, particularly when the data is unlikely to be more than a couple thousand rows in total. But there is a query that might be slow

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread Rob Sciuk
I believe that one poster (Rich Shepard?) touched upon the MDB-Tools in a response. I concur, if you have the skills to build these tools from source, the rest is easy ... The MDB Tools project hosted on SourceForge has a set of utilities which can enumerate tables, pull data, and schema

Re: [sqlite] Determine if UPDATE has worked.

2009-07-22 Thread Steve Martin
Simon Slavin wrote: >On 22 Jul 2009, at 12:40am, Steve Martin wrote: > > > >>$ fred testdb "create table bob(p1 text PRIMARY KEY, p2 text)" >>SQLITE_DONE: 101 : unknown error >> >> > >You do know this, and all your subsequent commands, will fail if you >still have your data in here from

Re: [sqlite] Installing SQLite

2009-07-22 Thread scabral
i don't get it... Nuno Magalhães-2 wrote: > > On Wed, Jul 22, 2009 at 21:30, scabral wrote: > > [...] > >> the instructions on the SQLite website are pretty crappy to say the >> least. >> When i download the zip file, all i get is 3 txt files??? > > [...] > > Oh...

Re: [sqlite] Installing SQLite

2009-07-22 Thread Rich Shepard
On Wed, 22 Jul 2009, scabral wrote: > When i download the sqlite-amalgamation-3_6_16.zip i get 3 text files: > > sqlite3 C File > sqlite3 H File > sqlite3ext H File > what am i supposed to do with those? Well, based on what others wrote about your initial comments, I suggest that you

Re: [sqlite] Installing SQLite

2009-07-22 Thread Rich Shepard
On Wed, 22 Jul 2009, scabral wrote: > does someone have 'good' instructions on what i need and how i need to > install SQLite on Windows XP? Scott, I don't do Windows; haven't for more than a dozen years. However, it doesn't look too hard. > the instructions on the SQLite website are pretty

Re: [sqlite] Installing SQLite

2009-07-22 Thread Thomas Briggs
Not in the InstallShield/MSI format that I imagine you're looking for no. But that's the whole point, really. See the "Precompiled Binaries" section of the download page. You'll find what you need (if not necessarily what you're looking for) there. -T On Wed, Jul 22, 2009 at 4:42 PM,

Re: [sqlite] Installing SQLite

2009-07-22 Thread Reid Thompson
On Wed, Jul 22, 2009 at 01:30:58PM -0700, scabral wrote: > > Hi, > > does someone have 'good' instructions on what i need and how i need to > install SQLite on Windows XP? > > I eventually want to create a desktop application to run on SQLite, but not > sure what language i want to use yet

Re: [sqlite] Installing SQLite

2009-07-22 Thread P Kishor
On Wed, Jul 22, 2009 at 3:42 PM, scabral wrote: > > When i download the sqlite-amalgamation-3_6_16.zip i get 3 text files: > > sqlite3   C File > sqlite3   H File > sqlite3ext H File > > what am i supposed to do with those? > > Is there no 'true' install? Read that entire

Re: [sqlite] Installing SQLite

2009-07-22 Thread scabral
When i download the sqlite-amalgamation-3_6_16.zip i get 3 text files: sqlite3 C File sqlite3 H File sqlite3ext H File what am i supposed to do with those? Is there no 'true' install? Scott P Kishor-3 wrote: > > On Wed, Jul 22, 2009 at 3:30 PM, scabral wrote: >>

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Igor Tandetnik
Zachary Turner wrote: > I still don't understand the transactions. For example, I issue a > single BEGIN at the start of my application and then insert about > 500MB of data through many small inserts (about 4KB each). During > this whole time I never issue a commit.

Re: [sqlite] Installing SQLite

2009-07-22 Thread P Kishor
On Wed, Jul 22, 2009 at 3:30 PM, scabral wrote: > > Hi, > > does someone have 'good' instructions on what i need and how i need to > install SQLite on Windows XP? > > I eventually want to create a desktop application to run on SQLite, but not > sure what language i want to

Re: [sqlite] Installing SQLite

2009-07-22 Thread Nuno Magalhães
On Wed, Jul 22, 2009 at 21:30, scabral wrote: [...] > the instructions on the SQLite website are pretty crappy to say the least. > When i download the zip file, all i get is 3 txt files??? [...] Oh... a troll. ___ sqlite-users

[sqlite] Installing SQLite

2009-07-22 Thread scabral
Hi, does someone have 'good' instructions on what i need and how i need to install SQLite on Windows XP? I eventually want to create a desktop application to run on SQLite, but not sure what language i want to use yet (pythong, ruby, etc...) the instructions on the SQLite website are pretty

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread Simon Slavin
On 22 Jul 2009, at 6:29pm, scabral wrote: > The OS is Windows XP. I know some VB script, some pearl and i'v > used Visual > VB and C# as well. Post on programming fora about VB (I assume you mean Visual Basic) (whichever version you're using) about accessing SQLite databases. They'll

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Zachary Turner
On Wed, Jul 22, 2009 at 1:42 PM, Pavel Ivanov wrote: > > Again, try to call sqlite3_memory_used() several times during work of > your application. What does it say to you? It says it's using about 3MB. Which suggests maybe it's my application. I believe I've identified the

Re: [sqlite] The SQL Guide to SQLite

2009-07-22 Thread Guido Ostkamp
Robert Citek wrote: > Anyone know of a way to preview the index, the table of contest, or > some sample chapters? I tried viewing form the Lulu site, but no > luck. It appears it has not been scanned by Google yet. However a limited preview of the other book "The

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Pavel Ivanov
> Assuming I don't do any manual commits, what does sqlite do with the > data that has yet to be committed? If you don't do commits (and "begins") of transactions by yourself then SQLite does that automatically after each executed statement. So when sqlite3_step returns you can be sure that

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Zachary Turner
On Wed, Jul 22, 2009 at 10:47 AM, Pavel Ivanov wrote: > SQLite synchronizes with disk during every commit (either issued by > yourself or automatic) at least 2 times (I don't know exact number). > So it's quite natural that it spends most of the time in winSync(). > But I still

Re: [sqlite] Indexes on the table

2009-07-22 Thread Joanne Pham
Thanks Simon for detail explaination about the indexes! JP From: Simon Slavin To: General Discussion of SQLite Database Sent: Tuesday, July 21, 2009 3:57:22 PM Subject: Re: [sqlite] Indexes on the table

Re: [sqlite] How do bitwise operators work? Prototype done

2009-07-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Since the solution is now specific to Python, I suggest continuing on the pysqlite/APSW mailing list - http://itsystementwicklung.de/cgi-bin/mailman/listinfo/list-pysqlite and http://news.gmane.org/gmane.comp.python.db.pysqlite.user Le Hyaric Bruno

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread Alan March
I would recommend Talend (http://www.talend.com/). It allows for export/import to/from almost any structured data source (including sqlite and Access) and has very good scripting capabilities (a visual designer which generates java or perl code). It doesn't have a scheduler but this may be managed

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread Rich Shepard
On Wed, 22 Jul 2009, scabral wrote: > The OS is Windows XP. I know some VB script, some pearl and i'v used Visual > VB and C# as well. > > I was thinking that the script would called from a windows scheduled task > and the script would then import the text file into the table in >

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread scabral
The OS is Windows XP. I know some VB script, some pearl and i'v used Visual VB and C# as well. I was thinking that the script would called from a windows scheduled task and the script would then import the text file into the table in SQLite...Sounds easy, but i'm not sure what's available to

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread Simon Slavin
On 22 Jul 2009, at 5:34pm, scabral wrote: > 1. Need to automatically import text file into SQLite database on > local > machine (machine always on). I was thinking of using scheduled task > to run > a script to do this, but not sure if that is possible. What programming languages or

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread cmartin
On Wed, 22 Jul 2009, scabral wrote: > i am new to SQLite and i currently have an access database that i would like > to convert over to a SQLite database. > > 1. Need to automatically import text file into SQLite database on local > machine (machine always on). I was thinking of using scheduled

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread P Kishor
On Wed, Jul 22, 2009 at 12:12 PM, scabral wrote: > > Do you know of any third party applications that i could use to build the > front end?  This will need to run on local machines, not on servers.  So, > some sort of desktop application i would imagine Applications

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread Rich Shepard
On Wed, 22 Jul 2009, scabral wrote: > Do you know of any third party applications that i could use to build the > front end? This will need to run on local machines, not on servers. So, > some sort of desktop application i would imagine Scott, Each language has its own. However, from

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread Nuno Magalhães
> Do you know of any third party applications that i could use to build the > front end?  This will need to run on local machines, not on servers.  So, > some sort of desktop application i would imagine That would be OS-dependent now, wouldn't it? Unless you're going to use Java or PHP or

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread scabral
Do you know of any third party applications that i could use to build the front end? This will need to run on local machines, not on servers. So, some sort of desktop application i would imagine thanks Scott P Kishor-3 wrote: > > On Wed, Jul 22, 2009 at 11:34 AM,

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread Rich Shepard
On Wed, 22 Jul 2009, P Kishor wrote: > Sure it is possible. You will have to choose your favorite programming > language, write a program to locate and import the local text file, and > set up a scheduler to do so periodically. > Lots of third-party applications. You might end up writing your

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread P Kishor
On Wed, Jul 22, 2009 at 11:34 AM, scabral wrote: > > HI, > > i am new to SQLite and i currently have an access database that i would like > to convert over to a SQLite database. > > there are a couple of processes that would need to take place in order for > this to work and

[sqlite] Ability to convert Access to SQLite

2009-07-22 Thread scabral
HI, i am new to SQLite and i currently have an access database that i would like to convert over to a SQLite database. there are a couple of processes that would need to take place in order for this to work and i'm not sure if SQLite has these capabilities: 1. Need to automatically import

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Marcus Grimm
just a point: In your pseudocode you precreate statements for the begin and commit and trying to reuse them later on. If your real code is like this I would suggest to take a look at this. I think it is not possible to "re-step" a begin or commit, you may try to recreate these statements

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Pavel Ivanov
SQLite synchronizes with disk during every commit (either issued by yourself or automatic) at least 2 times (I don't know exact number). So it's quite natural that it spends most of the time in winSync(). But I still didn't understand from your explanation how exactly your application works and

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Zachary Turner
On Tue, Jul 21, 2009 at 6:45 PM, Pavel Ivanov wrote: >> If I remove or comment out the >> three lines with //* in the code above, I get no memory leaks. > > So basically you're saying that if you don't insert any data into your > database and thus effectively don't do with your

[sqlite] How do bitwise operators work? Prototype done

2009-07-22 Thread Le Hyaric Bruno
Hi thanks again Igor, I've successfully use sqlite3 on a quite real volume of data with custom bitwise functions for data selection. Here is the script Python 2.5 that serves as a proof of concept : import os import sqlite3 def blob_and(b1,b2): op1 = str(b1) op2 = str(b2) i = 0

[sqlite] Determine if UPDATE has worked.

2009-07-22 Thread Steve Martin
Hi List, I am new to sqlite and having trouble determining if an update has worked. I am using the C/C++ API. For an update, when sqlite3_step is executed it returns SQLITE_DONE when a record is updated or if a record does not exist. I have not found an answer by reading and searching the