Re: [sqlite] Question about database design

2011-02-03 Thread Jay Kreibich
On Feb 3, 2011, at 3:38 AM, Simon Slavin wrote: > SQLite creates some indexes the programmer doesn't specifically ask for: on > the rowid, on the primary key, and on any column declared as UNIQUE. Of > course, in a particular table all three of these might actually be the same > column, so it

Re: [sqlite] Question about database design

2011-02-03 Thread Simon Slavin
On 3 Feb 2011, at 10:43am, Mihai Militaru wrote: > Nicolas Williams wrote: > >>> Any idea why pg does ok on these queries without the extra index - >>> Maybe they're created by default? SQLIte doesn't create any indexes >>> automatically on primary key fields or anything else, correct? >> >>

Re: [sqlite] Question about database design

2011-02-03 Thread Mihai Militaru
On Wed, 2 Feb 2011 18:59:48 -0600 Nicolas Williams wrote: > > Any idea why pg does ok on these queries without the extra index - > > Maybe they're created by default? SQLIte doesn't create any indexes > > automatically on primary key fields or anything else, correct? > > No, it doesn't. Use EX

Re: [sqlite] Question about database design

2011-02-02 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/02/2011 11:48 AM, Bert Nelsen wrote: > Because I felt so stupid about these mostly empty columns taking so much > space, I tended to replace all the "phone" columns by a single column named > "customerPhone". > I stored the values into customerPh

Re: [sqlite] Question about database design

2011-02-02 Thread Nicolas Williams
On Wed, Feb 02, 2011 at 04:45:16PM -0800, Jeff Rogers wrote: > Nicolas Williams wrote: > >On Wed, Feb 02, 2011 at 03:23:49PM -0800, Jeff Rogers wrote: > > > >>SQLite seems to do quite poorly performance-wise with fully-normalized > >>attribute tables like this, when you want to query against multip

Re: [sqlite] Question about database design

2011-02-02 Thread Simon Slavin
On 3 Feb 2011, at 12:45am, Jeff Rogers wrote: > Any idea why pg does ok on these queries without the extra index - > Maybe they're created by default? Both PostgreSQL and SQLite will make indexes on the fly if that's the most efficient way of scanning the table. However, PostgreSQL can keep t

Re: [sqlite] Question about database design

2011-02-02 Thread Jeff Rogers
Nicolas Williams wrote: > On Wed, Feb 02, 2011 at 03:23:49PM -0800, Jeff Rogers wrote: > >> SQLite seems to do quite poorly performance-wise with fully-normalized >> attribute tables like this, when you want to query against multiple >> attributes. My timing comparisons with postgres show sqlite

Re: [sqlite] Question about database design

2011-02-02 Thread Nicolas Williams
On Wed, Feb 02, 2011 at 03:38:07PM -0800, Jim Morris wrote: > I'd probably move the analyze out of the loop. > > Since your joining on props.id a better index pind might be > create index pind on props (id, pnam) Yes, you probably want two covering or partially-covering indexes: CREATE INDEX pin

Re: [sqlite] Question about database design

2011-02-02 Thread Jim Morris
I'd probably move the analyze out of the loop. Since your joining on props.id a better index pind might be create index pind on props (id, pnam) The name of column id in table props would be clearer as obj_id since it is not the id of the property but the id of the record in the obj table. On 2

Re: [sqlite] Question about database design

2011-02-02 Thread Nicolas Williams
On Wed, Feb 02, 2011 at 03:23:49PM -0800, Jeff Rogers wrote: > Andreas Kupries wrote: > > > It seems to me that you are looking for > > http://en.wikipedia.org/wiki/Database_normalization > > > > SQLite seems to do quite poorly performance-wise with fully-normalized > attribute tables like t

Re: [sqlite] Question about database design

2011-02-02 Thread Jeff Rogers
Andreas Kupries wrote: > It seems to me that you are looking for > http://en.wikipedia.org/wiki/Database_normalization > SQLite seems to do quite poorly performance-wise with fully-normalized attribute tables like this, when you want to query against multiple attributes. My timing compar

Re: [sqlite] Question about database design

2011-02-02 Thread Simon Slavin
On 2 Feb 2011, at 7:48pm, Bert Nelsen wrote: > customer_lastname > customer_firstname > customer_street > customer_PhonePrivate (will almost always stay empty) > customer_PhoneCompany > customer_PhoneMobile > customer_PhoneWAP (will almost always stay empty) > customer_Phone1 (will almost always

Re: [sqlite] Question about database design

2011-02-02 Thread Andreas Kupries
On 2/2/2011 11:48 AM, Bert Nelsen wrote: > Hello! > > I have over 100 columns in a table. Most of the columns will stay empty. > Just an example: [example elided] > This is kind of an xml design, but it works and it takes up less space. > I "decompile" this weird expression at runtime to get the s

Re: [sqlite] Question about database design

2011-02-02 Thread Duquette, William H (318K)
On 2/2/11 11:48 AM, "Bert Nelsen" wrote: > Because I felt so stupid about these mostly empty columns taking so much > space, I tended to replace all the "phone" columns by a single column named > "customerPhone". > I stored the values into customerPhone like that: > > > > This is kind of an xm

[sqlite] Question about database design

2011-02-02 Thread Bert Nelsen
Hello! I have over 100 columns in a table. Most of the columns will stay empty. Just an example: customer_lastname customer_firstname customer_street customer_PhonePrivate (will almost always stay empty) customer_PhoneCompany customer_PhoneMobile customer_PhoneWAP (will almost always stay empty)

Re: [sqlite] Question about database?

2006-07-13 Thread John Stanton
Concurrency is the number of simultaneous, independent users of the database, not the transaction rate. That is the criterion I would use to select the appropriate tool. Cesar David Rodas Maldonado wrote: About the concurrence, i don't know... about 2000 queries per second... Wich db engine

Re: [sqlite] Question about database?

2006-07-13 Thread drh
"Cesar David Rodas Maldonado" <[EMAIL PROTECTED]> wrote: > Thanks for explain me that... so what do you think will be the solution? Lots more RAM. Enough to hold the entire database. -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] Question about database?

2006-07-13 Thread Cesar David Rodas Maldonado
Richard Hipp : Thanks for explain me that... so what do you think will be the solution? what do you think about db in Clustering. On 7/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: "Cesar David Rodas Maldonado" <[EMAIL PROTECTED]> wrote: > About the concurrence, i don't know... about 2

Re: [sqlite] Question about database?

2006-07-13 Thread drh
"Cesar David Rodas Maldonado" <[EMAIL PROTECTED]> wrote: > About the concurrence, i don't know... about 2000 queries per second... Wich > db engine will be good?... i have a server with 2 GB ram, AMD sempron > 64bits, > You have 8 billion records and 2 billion bytes of ram. So your data will not

Re: [sqlite] Question about database?

2006-07-13 Thread Eduardo
At 17:22 13/07/2006, you wrote: About the concurrence, i don't know... about 2000 queries per second... Wich db engine will be good?... i have a server with 2 GB ram, AMD sempron 64bits, First, i'll try PostgreSQL, Firebird and at last (very last) MySQL. For commercial databases, Valentina and

Re: [sqlite] Question about database?

2006-07-13 Thread Cesar David Rodas Maldonado
About the concurrence, i don't know... about 2000 queries per second... Wich db engine will be good?... i have a server with 2 GB ram, AMD sempron 64bits, On 7/12/06, John Stanton <[EMAIL PROTECTED]> wrote: Jay gave you the clue. You need to have software and hardware which will address data b

Re: [sqlite] Question about database?

2006-07-12 Thread John Stanton
Jay gave you the clue. You need to have software and hardware which will address data beyond 32 bits, i.e. 64 bit file addressing. The 64 bit file version of all the tools you mention should perform your job. Now you choose according to the scale of your application, Enterprise, Department

Re: [sqlite] Question about database?

2006-07-12 Thread John Stanton
Cesar David Rodas Maldonado wrote: Hello to everybody! I want to ask to the people something... If i have a table with about 8.000.000.000 registers, and i have to do a select in a numeric row that will have index. what db do you recommend to me for use? Thanxs (:D) people! How many concurren

Re: [sqlite] Question about database?

2006-07-12 Thread Eduardo
At 19:59 12/07/2006, you wrote: 32 bits, the size of the key, only holds numbers up to 2 or 4 billion. You said you have 8 billion rows. You need a 64 bit version or to split up the data into many tables. On 7/12/06, Cesar David Rodas Maldonado <[EMAIL PROTECTED]> wrote: So Jay... Do you think

Re: [sqlite] Question about database?

2006-07-12 Thread Jay Sprenkle
On 7/12/06, Nuno Lucas <[EMAIL PROTECTED]> wrote: On 7/12/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: > 32 bits, the size of the key, only holds numbers up to 2 or 4 billion. > You said you have 8 billion rows. > You need a 64 bit version or to split up the data into many tables. I never needed

Re: [sqlite] Question about database?

2006-07-12 Thread Nuno Lucas
On 7/12/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: 32 bits, the size of the key, only holds numbers up to 2 or 4 billion. You said you have 8 billion rows. You need a 64 bit version or to split up the data into many tables. I never needed this so I'm not fully sure, but isn't "INTEGER PRIMARY

Re: [sqlite] Question about database?

2006-07-12 Thread Jay Sprenkle
On 7/12/06, Gussimulator <[EMAIL PROTECTED]> wrote: Yeah and while we're at it, he could invest a few bucks on a couple twin diesel generators, a battery room, and whatnot, a group of hookers to save the night. You forgot the beer and pizza delivery contract!

Re: [sqlite] Question about database?

2006-07-12 Thread Cesar David Rodas Maldonado
e the night. - Original Message - From: "Jay Sprenkle" <[EMAIL PROTECTED]> To: Sent: Wednesday, July 12, 2006 3:15 PM Subject: Re: [sqlite] Question about database? > On 7/12/06, Cesar David Rodas Maldonado <[EMAIL PROTECTED]> wrote: >> I don't care abou

Re: [sqlite] Question about database?

2006-07-12 Thread Gussimulator
6 3:15 PM Subject: Re: [sqlite] Question about database? On 7/12/06, Cesar David Rodas Maldonado <[EMAIL PROTECTED]> wrote: I don't care about hardware... i will do cluster... but which DB motor do think will be good for work with great velocity in select (sqlite, postgresql or mysql). ah.

Re: [sqlite] Question about database?

2006-07-12 Thread Cesar David Rodas Maldonado
Yeah. I was reading a few of Mysql replications and stuff like that. Thanks for you help Jay On 7/12/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: On 7/12/06, Cesar David Rodas Maldonado <[EMAIL PROTECTED]> wrote: > I don't care about hardware... i will do cluster... but which DB motor do > thi

Re: [sqlite] Question about database?

2006-07-12 Thread Jay Sprenkle
On 7/12/06, Cesar David Rodas Maldonado <[EMAIL PROTECTED]> wrote: I don't care about hardware... i will do cluster... but which DB motor do think will be good for work with great velocity in select (sqlite, postgresql or mysql). ah.. i almost forgot... i will do a great number of select... I d

Re: [sqlite] Question about database?

2006-07-12 Thread Cesar David Rodas Maldonado
I don't care about hardware... i will do cluster... but which DB motor do think will be good for work with great velocity in select (sqlite, postgresql or mysql). ah.. i almost forgot... i will do a great number of select... On 7/12/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: 32 bits, the size

Re: [sqlite] Question about database?

2006-07-12 Thread Jay Sprenkle
32 bits, the size of the key, only holds numbers up to 2 or 4 billion. You said you have 8 billion rows. You need a 64 bit version or to split up the data into many tables. On 7/12/06, Cesar David Rodas Maldonado <[EMAIL PROTECTED]> wrote: So Jay... Do you think that i have to use a PC of 64 bi

Re: [sqlite] Question about database?

2006-07-12 Thread Cesar David Rodas Maldonado
So Jay... Do you think that i have to use a PC of 64 bits, or 32bits pc with clustering? On 7/12/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: > Hello to everybody! > > I want to ask to the people something... If i have a table with about > 8.000.000.000 registers, and i have to do a select in a

Re: [sqlite] Question about database?

2006-07-12 Thread Jay Sprenkle
Hello to everybody! I want to ask to the people something... If i have a table with about 8.000.000.000 registers, and i have to do a select in a numeric row that will have index. what db do you recommend to me for use? If you design the database correctly it should work, but I believe that lar

[sqlite] Question about database?

2006-07-12 Thread Cesar David Rodas Maldonado
Hello to everybody! I want to ask to the people something... If i have a table with about 8.000.000.000 registers, and i have to do a select in a numeric row that will have index. what db do you recommend to me for use? Thanxs (:D) people!