Re: [GENERAL] General question

2011-03-23 Thread David Johnston
: Wednesday, March 23, 2011 11:02 AM To: David Johnston Cc: pgsql Subject: Re: [GENERAL] General question It is a user accounts, which might then become customer accounts, accounting accounts, etc. I will use specialization and generalization concepts in database. I did not complete the design

Re: [GENERAL] General question

2011-03-23 Thread salah jubeh
: David Johnston To: salah jubeh Cc: pgsql Sent: Wed, March 23, 2011 3:46:24 PM Subject: RE: [GENERAL] General question What kind of account are we talking about? A user account, an accounting account, a customer account, something else? IF you were to use a non-shared foreign key in the

Re: [GENERAL] General question

2011-03-23 Thread David Johnston
to account? David J. From: salah jubeh [mailto:s_ju...@yahoo.com] Sent: Wednesday, March 23, 2011 10:29 AM To: David Johnston Cc: pgsql Subject: Re: [GENERAL] General question Dear Johnston, Thanks for the reply, I really get a lot of benefit from it. In my design, I have several

Re: [GENERAL] General question

2011-03-23 Thread salah jubeh
porting to another database system. Regards From: David Johnston To: salah jubeh ; pgsql Sent: Wed, March 23, 2011 2:58:54 PM Subject: RE: [GENERAL] General question The main significant advantage that NOT making the primary key also a foreign key is that you

Re: [GENERAL] General question

2011-03-23 Thread David Johnston
l.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of salah jubeh Sent: Wednesday, March 23, 2011 8:18 AM To: pgsql Subject: [GENERAL] General question Hello, Some times the primary key is the same as the foreign key such as in the following design. which is used to model 1-1 relati

[GENERAL] General question

2011-03-23 Thread salah jubeh
Hello, Some times the primary key is the same as the foreign key such as in the following design. which is used to model 1-1 relationship. In the database books, such as database fundamentals(Masri), the 1-1 relation is modeled by having two separate key. when this kind of design (shared ke

Re: [GENERAL] General Question about database -- redirection

2010-04-15 Thread akp geek
Thank you On Thu, Apr 15, 2010 at 8:49 PM, Jorge Godoy wrote: > create database db_1 template db_2; > > This will create a new DB_1 using DB_2 as template. Otherwise, you'll > change your code to connect to DB_2 instead of connecting to DB_1. > > -- > Jorge Godoy > > > > On Thu, Apr 15, 20

Re: [GENERAL] General Question about database -- redirection

2010-04-15 Thread Jorge Godoy
create database db_1 template db_2; This will create a new DB_1 using DB_2 as template. Otherwise, you'll change your code to connect to DB_2 instead of connecting to DB_1. -- Jorge Godoy On Thu, Apr 15, 2010 at 14:49, akp geek wrote: > dear all - > > I am not supposed to a

[GENERAL] General Question about database -- redirection

2010-04-15 Thread akp geek
dear all - I am not supposed to ask this. But, the question is I have 2 databases DB_1 and DB_2. I have a script that loads few tables in DB_1. The 2 databases are identical. In case , if database DB_1 is dropped, Is there any command that I can issue to use the DB_2? Regards

Re: [GENERAL] General question about speed of functions

2010-04-13 Thread tv
On Tue, 13 Apr 2010 10:26:04 -0400, Brent Friedman wrote: > I am starting a project next week that looks like it will involve some > massive sql rewrites to gain needed performance, and I am looking at > implementing as many functions as possible. I haven't worried that much > about specific i

[GENERAL] General question about speed of functions

2010-04-13 Thread Brent Friedman
I am starting a project next week that looks like it will involve some massive sql rewrites to gain needed performance, and I am looking at implementing as many functions as possible. I haven't worried that much about specific implementations in the past, but this project can use any performan

Re: [GENERAL] general question on two-partition table

2009-07-28 Thread Stephen Frost
* Janet Jacobsen (jsjacob...@lbl.gov) wrote: > I looked at the documentation for partitions - it is the case, right, that I > have to create the master table and the two partition tables (depending > on the value of rbscore) and then copy the records from the existing > table into the two partition

Re: [GENERAL] general question on two-partition table

2009-07-28 Thread Janet Jacobsen
Hi. Thanks for your reply. I looked at the documentation for partitions - it is the case, right, that I have to create the master table and the two partition tables (depending on the value of rbscore) and then copy the records from the existing table into the two partitions? Stephen Frost wrot

Re: [GENERAL] general question on two-partition table

2009-07-27 Thread Stephen Frost
* Janet Jacobsen (jsjacob...@lbl.gov) wrote: > If they are going to spend 95% of their time querying the > records that meet the 'good' criteria, what are the good > strategies for ensuring good performance for those queries? > (1) Should I partition the table into two partitions based on > the val

Re: [GENERAL] general question on two-partition table

2009-07-27 Thread David Wilson
On Mon, Jul 27, 2009 at 8:24 PM, Greg Stark wrote: > I think it would be even more interesting to have partial indexes -- > ie specified with "WHERE rbscore < cutoff". Yes- that's what I actually meant. Word got scrambled between brain and fingers... -- - David T. Wilson david.t.wil...@gmail.co

Re: [GENERAL] general question on two-partition table

2009-07-27 Thread Greg Stark
On Tue, Jul 28, 2009 at 1:08 AM, David Wilson wrote: > On Mon, Jul 27, 2009 at 7:52 PM, Janet Jacobsen wrote: > >> Can you suggest other strategies? > > Something that might be easier to play with is to create a (or > several, to speed up other queries) functional index on the comparison > between

Re: [GENERAL] general question on two-partition table

2009-07-27 Thread David Wilson
On Mon, Jul 27, 2009 at 7:52 PM, Janet Jacobsen wrote: > Can you suggest other strategies? Something that might be easier to play with is to create a (or several, to speed up other queries) functional index on the comparison between rbscore and the cutoff. It won't buy you anything on seq scans,

[GENERAL] general question on two-partition table

2009-07-27 Thread Janet Jacobsen
Hi. We have a table with 30 M records that is growing by about 100 K records per day. The experimentalists, whose data are in the table, have decided that they will focus on the records for which the value of one field, rbscore, is greater than a cut-off. However, they want to continue to store a