[GENERAL] Doubt in Backup

2011-03-20 Thread Adarsh Sharma
Dear all, 2 days ago, I need to backup 2 databases in my Database server because I need to format the system and reinstalls again with the back up databases. After a fresh install of ubuntu-10.4 , I install postgreplus-8.4 binary and I think giving the previous data directory /hdd2-1/postgres

[GENERAL] query execution time

2011-03-20 Thread preetika tyagi
Hi, I am wondering if someone can help me understand the following query execution behavior: I have two similar tables and table2 consists of 500 records. Query: INSERT INTO table1 SELECT * FROM table2. Execution Time: A ms. Query: INSERT INTO table1 SELECT * FROM table2. Execution Time: B

Re: [GENERAL] Database Design for Components and Interconnections

2011-03-20 Thread Andy Colson
On 03/20/2011 09:25 PM, ray joseph wrote: From: Andy Colson [mailto:a...@squeakycode.net] Sent: Sunday, March 20, 2011 8:48 PM Subject: Re: [GENERAL] Database Design for Components and Interconnections You may, or may not, want a top level table: create table chips ( chipid serial,

Re: [GENERAL] Database Design for Components and Interconnections

2011-03-20 Thread ray joseph
> From: Andy Colson [mailto:a...@squeakycode.net] > Sent: Sunday, March 20, 2011 8:48 PM > Subject: Re: [GENERAL] Database Design for Components and Interconnections > > >> > >> You may, or may not, want a top level table: > >> > >> create table chips > >> ( > >>chipid serial, > >>descr te

Re: [GENERAL] Database Design for Components and Interconnections

2011-03-20 Thread Andy Colson
You may, or may not, want a top level table: create table chips ( chipid serial, descr text ); Yes, I see great value in a top level component table. I am not sure how to handle multiple instances of the same type of chip in different services. I think the idea is to give eac

Re: [GENERAL] Database Design for Components and Interconnections

2011-03-20 Thread ray joseph
> From: Andy Colson [mailto:a...@squeakycode.net] > Sent: Sunday, March 20, 2011 9:01 AM > > On 03/19/2011 11:40 PM, ray wrote: > > I am looking for some help in database design. I would like to design > > a database to help design alternative designs of a basic electronic > > circuit design.

Re: [GENERAL] a question about row estimation in postgres

2011-03-20 Thread Nathan Boley
> Following the formula outlined > in http://www.postgresql.org/docs/8.3/static/row-estimation-examples.html > Both gradrate 10 and gradrate 11 would fall in the first bucket. > Shouldn't the row estimation be: > (11 - 8) / (33 - 8) / 10 * 1302 = 15.624 > and > (10 - 8) / (33 - 8) / 10 * 1302 = 10.

Re: [GENERAL] a question about row estimation in postgres

2011-03-20 Thread Tomas Vondra
Dne 20.3.2011 08:20, Reynold Xin napsal(a): > Following the formula outlined > in http://www.postgresql.org/docs/8.3/static/row-estimation-examples.html > > Both gradrate 10 and gradrate 11 would fall in the first bucket. > > Shouldn't the row estimation be: > > (11 - 8) / (33 - 8) / 10 * 1302 =

[GENERAL] a question about row estimation in postgres

2011-03-20 Thread Reynold Xin
I have a rankings table and it has 1302 rows in total. I am a bit confused by how postgres (8.2.11) calculates the cardinality for this rankings table based on < predicates on gradrate attribute. select histogram_bounds from pg_stats where attname = 'gradrate' and tablename = 'rankings';

Re: [GENERAL] Database Design for Components and Interconnections

2011-03-20 Thread ray joseph
David, Thank your for the your thoughts. I have psql installed and I am currently trying to use pgADMIN III. I have used it to make and drop Databases and tables. I have not yet successfully built a table from SQL. I have taken one of my Excel tables and used it to build a CREATE table script.

Re: [GENERAL] Database Design for Components and Interconnections

2011-03-20 Thread David Johnston
Ray, You seem to have a fairly good understanding of the model you are working with. I'd suggest simply finding some technical SQL resources, install PostgreSQL, and fire away. Learn by doing. When doing the design focus on minimizing the amount of non-key repetition that you model (find and re

Re: [GENERAL] Database Design for Components and Interconnections

2011-03-20 Thread Andy Colson
On 03/19/2011 11:40 PM, ray wrote: I am looking for some help in database design. I would like to design a database to help design alternative designs of a basic electronic circuit design. I have a list of components that will be interconnected for a basic design. Additional components and ass

Re: [GENERAL] cannot connect to server

2011-03-20 Thread John R Pierce
On 03/20/11 3:06 AM, srikanth subramaniam wrote: Please tell me wat to do, I have lots of data in it. If the problem with firewall or antivirus, how do I see If it is TCP/IP problem how do I see and set it sounds like postgres might not be running at all.I'd check the end of the server's l

[GENERAL] cannot connect to server

2011-03-20 Thread srikanth subramaniam
I have a standalone machine, I run PostgreSQL on this machine only. I installed the software 3 years back. My OS is Windows Vista Business.  I have anti virus installed on this machine I also have internet connection on this machine It was working till Friday. I have been using the machine, but d

Re: [GENERAL] How do you stop the log from rotating on restart?

2011-03-20 Thread Gurjeet Singh
On Sat, Mar 19, 2011 at 8:00 PM, runner wrote: > Postgres 9.0.3 on Solaris 10 > > Can't seem to figure out how to stop the postgres log file from rotating > on a restart of services. > > log_truncate_on_rotation is commented out > log_rotation_age = 1d > > We just want it to rotate once a day