[sqlite] indexing question

2009-04-02 Thread baxy77bax
hi, i need some help to see if i understood the point about indexing. if i have 2 tables. each table has 2 columns. and now i want to join those tables through one column in each table: example T1 C1 C2 | +--+ | T2 | C1 C2 let say the columns in question are C1(t1) and C2(t2) first q

[sqlite] question about indexing

2009-04-02 Thread baxy77bax
hi, i need some help to see if i understood the point about indexing. if i have 2 tables. each table has 2 columns. and now i want to join those tables through one column in each table: example T1 C1 C2 | +--+ | T2 | C1 C2 let say the columns in question are C1(t1) and C2(t2) first

[sqlite] select by min di

2009-03-29 Thread baxy77bax
hi , i need help with this one : i have a table with 2 columns C1 & C2: C1 C2 a 1 b 1 b 2 b 4 c 3 v 2 c 5 d 5 and i need to get this: C1 C2 a 1 b 1 c 3 d 5 v 2 so a unique set of data in column C1 where C2 is the min id for that data ? thank you ! -- View this message

Re: [sqlite] is primary key already indexed ?

2009-03-19 Thread baxy77bax
data T2 > T1), db is 32 GB in total size D. Richard Hipp wrote: > > > On Mar 19, 2009, at 9:38 AM, baxy77bax wrote: > >> >> >> :-D >> >> one more question : >> >> if i create primary key on my table and then import the data >> (assu

Re: [sqlite] is primary key already indexed ?

2009-03-19 Thread baxy77bax
faster. i have 3890660 rows to import and row van be up to 50M large, so it's taking a pretty long time thnx Kees Nuyt wrote: > > On Thu, 19 Mar 2009 02:54:34 -0700 (PDT), baxy77bax > wrote: > >> >>hi my question is : if i create table that contains primary key

Re: [sqlite] is primary key already indexed ?

2009-03-19 Thread baxy77bax
faster. i have 3890660 rows to import and row van be up to 50M large, so it's taking a pretty long time thnx Kees Nuyt wrote: > > On Thu, 19 Mar 2009 02:54:34 -0700 (PDT), baxy77bax > wrote: > >> >>hi my question is : if i create table that contains primary key

[sqlite] is primary key already indexed ?

2009-03-19 Thread baxy77bax
hi my question is : if i create table that contains primary key like; create table TEST (field1 varchar not null primary key); do i need to create index on it or not? and is it better to create table with a primary key and then import data in it or create table without a key , import data and t

Re: [sqlite] control buffering of query results

2009-03-17 Thread baxy77bax
P Kishor-3 wrote: > > On Tue, Mar 17, 2009 at 6:44 AM, baxy77bax wrote: >> >> hi >> >> i need help with this one. >> >> i have this perl script that goes something like this: >> >> my $fetchrow_stmt; >> >> sub _fetchrow_stm

[sqlite] control buffering of query results

2009-03-17 Thread baxy77bax
hi i need help with this one. i have this perl script that goes something like this: my $fetchrow_stmt; sub _fetchrow_stmt { my ($self,%arg) = @_; my $stm = "select * from $arg{table}"; $fetchrow_stmt = $dbh->prepare($stm) || die $dbh->errstr; ; $fetchrow_stmt->execute || die

Re: [sqlite] how to divide a database?

2009-03-13 Thread baxy77bax
create two db's attach the original. And insert the data using a > select statement with a where clause. > > > > --- On Thu, 3/12/09, baxy77bax wrote: > >> From: baxy77bax >> Subject: Re: [sqlite] how to divide a database? >> To: sqlite-users@sqlite.

Re: [sqlite] how to divide a database?

2009-03-12 Thread baxy77bax
table1table2 11 33 22 44 Jim Dodgen wrote: > > I am confused also. > > Are you wanting to put half the rows from each table in each database? > > On Thu, Mar 12, 2009 at 2:01 PM, baxy77bax wrote: &g

[sqlite] how to divide a database?

2009-03-12 Thread baxy77bax
hi, let say that i have one db with 2 tables in it. and now i wish to divide that database in 2 equal (half size of the original) databases. two tables in initial database have one column. how would i do that ?:confused: any suggestions thank you -- View this message in context: http://www.na

Re: [sqlite] change the limitation of attached databases through perl

2009-03-08 Thread baxy77bax
John Machin wrote: > > On 8/03/2009 9:02 AM, baxy77bax wrote: >> hi, >> >> i need help with attaching databases. in my last post i recived some >> valuable info on limitation of attached databases (Thanx !!). since i'm >> using perl (its DBI) all modif

[sqlite] change the limitation of attached databases through perl

2009-03-07 Thread baxy77bax
hi, i need help with attaching databases. in my last post i recived some valuable info on limitation of attached databases (Thanx !!). since i'm using perl (its DBI) all modifications like cache_size, max page number , journal size ... i've introduced through PRAGMA but for limitations on number

[sqlite] is there any way to attach more than 10 databases ?

2009-03-07 Thread baxy77bax
hi i have a problem , my program is returning me the message that sqlite is complaining, because it can't attach more than 10 databases at once. is that true ? and is there a way to attach at least 30 db at once ? thanx! bax -- View this message in context: http://www.nabble.com/is-there-any

[sqlite] number of columns in a table

2009-02-18 Thread baxy77bax
hi, my question is how to get the number of columns in an existing table. example if i can retrieve the number of rows with SELECT count(*) FROM table , is there also some simple query to do the same thing for counting the number of columns thnx r -- View this message in context: http://www.

Re: [sqlite] drop table question ?

2009-02-03 Thread baxy77bax
i was thinking the same thing but then it hit me that maybe there is already an existing solution. :) thanx RB Smissaert wrote: > > Run a loop in the code of your application and drop the tables. I don't > think SQLite can do something like this. > > RBS > >> >> hi >> >> simple question : H

[sqlite] drop table question ?

2009-02-03 Thread baxy77bax
hi simple question : How to drop all tables in my database that start , for example, with X? table 1 is X1998 table 2 is X8676 table 3 is X2912 ... thanx -- View this message in context: http://www.nabble.com/drop-table-question---tp21806118p21806118.html Sent from the SQLite mailing list ar

Re: [sqlite] problems with importing data from c

2009-01-21 Thread baxy77bax
Thank You !! i get it now! robert Igor Tandetnik wrote: > > "baxy77bax" wrote in > message news:21581675.p...@talk.nabble.com >> the problem is that i have this situation: >> >> /*global*/ >> /*for sqlite */ >> sqlite3 *db; >

[sqlite] problems with importing data from c

2009-01-21 Thread baxy77bax
hi, the problem is, i'm trying to modify some c script but i'm not originally c programmer, so c is not my strong side . the problem is that i have this situation: /*global*/ /*for sqlite */ sqlite3 *db; sqlite3_stmt* insert_stmt; /*finito sqlite*/ // function : Pr (VoidPtr ptr){ // 3

[sqlite] need examples of sqlite interface for c

2009-01-17 Thread baxy77bax
hi , i'm a perl programmer who needs some examples (basic and complete and functional) of c programming code that interface with sqlite. something like : 1. connect to the database xy 2. create a table xz 3. index a table (create index r1 on ...) 4. insert data that c program is producing into

[sqlite] count duplicates in the table coloumn

2008-11-12 Thread baxy77bax
hi, my question is: Is there a way to count the number of specific data in the column of a table, for example: let say i have a table like this: numbers 1 2 2 3 4 4 4 ... and i would like to report my data in form: numbers | count 1 | 1 2 | 2 3 | 1 4 | 3 ... so far i have been doing this by usin

[sqlite] copy tables between databases or join databases

2008-11-07 Thread baxy77bax
hi, well i need some help considering ways to copy files between databases or if it is somehow possible to join several sqlite databases. i'm familiar with perl modules that deal with sql databases but so far all transactions are too slow for ma project , so i'm looking for a way to just direc