RE: [SQL] Speed or configuration

2000-08-20 Thread The Hermit Hacker
On Sun, 20 Aug 2000, Franz J Fortuny wrote: > > > > "What version of Postgres are you using, and what does > EXPLAIN show > as the query plan for this query? How many tableY rows > is the sub- > query likely to produce, and how many matches do you > expect to get > from tableX?" > > Version:

RE: [SQL] Speed or configuration

2000-08-20 Thread Franz J Fortuny
"First question(s) I have is what version of PostgreSQL? what hardware is the commercial SQL server running on? PostgreSQL? memory, cpu, hard drives, etc?" Version: postgresql-7.0.2-2.i386.rpm Hardware: Same Hardware for all SQL Servers (same machine, of course, one SQL Server is idle while the

RE: [SQL] Speed or configuration

2000-08-20 Thread Franz J Fortuny
"What version of Postgres are you using, and what does EXPLAIN show as the query plan for this query? How many tableY rows is the sub- query likely to produce, and how many matches do you expect to get from tableX?" Version: postgresql-7.0.2-2.i386.rpm Explain: Scan table, scan table. (Plus t

Re: [SQL] update syntax error?

2000-08-20 Thread The Hermit Hacker
UPDATE SET field1=,field2= On Tue, 15 Aug 2000, k.c. hemelstrand wrote: > Can anybody help with why I am receiving the error below? > > Thanks > K.C. > > > parts=# \d av_parts > Table "av_parts" > Attribute |Type |

Re: [SQL] database design and diagraming book recommendations..

2000-08-20 Thread David Lloyd-Jones
"Francisco Hernandez" <[EMAIL PROTECTED]> > anyone know of a good book or books on database modeling? > like for entity relationship diagrams and such.. To get a good life, go with Chris Date's rather difficult two volume set. -dlj.

[SQL] update syntax error?

2000-08-20 Thread k.c. hemelstrand
Can anybody help with why I am receiving the error below?   Thanks K.C.     parts=# \d av_parts Table "av_parts"  Attribute  |    Type |   Modifier    -+-+-

[SQL] datatype SET

2000-08-20 Thread Marc Roos
Does anyone have information on how to create a datatype SET in postgres???

Re: [SQL] Speed or configuration

2000-08-20 Thread Stephan Szabo
(It won't really be forever, just probably a really long time) You can usually get around it by rewriting the query to use EXISTS rather than IN. Stephan Szabo [EMAIL PROTECTED] On Sun, 20 Aug 2000, Franz J Fortuny wrote: > At our company we are presently using a commercial > database that gen

Re: [SQL] Speed or configuration

2000-08-20 Thread Tom Lane
"Franz J Fortuny" <[EMAIL PROTECTED]> writes: > [ this query is slow: ] > select xx1,xx2,xx3 from tableX > where field1 in > (select field1 from tableY where > field2=NNN and field3=NNN2 and field4=NNN4) What version of Postgres are you using, and what does EXPLAIN show as the query plan for this

Re: [SQL] Speed or configuration

2000-08-20 Thread The Hermit Hacker
On Sun, 20 Aug 2000, Franz J Fortuny wrote: > At our company we are presently using a commercial > database that generates results from this query: > > select xx1,xx2,xx3 from tableX > where field1 in > (select field1 from tableY where > field2=NNN and field3=NNN2 and field4=NNN4) > > tableX ha

Re: [SQL] protecting a field after creation

2000-08-20 Thread Tom Lane
Louis-David Mitterrand <[EMAIL PROTECTED]> writes: > Is there a way (outside of RULEs and TRIGGERs) to make a field > read-only once it is INSERTed or assigned its default value? I'm > thinking, for example, of the "created" column that I add to most > tables, holding the row's creation timestamp

[SQL] protecting a field after creation

2000-08-20 Thread Louis-David Mitterrand
Hello, Is there a way (outside of RULEs and TRIGGERs) to make a field read-only once it is INSERTed or assigned its default value? I'm thinking, for example, of the "created" column that I add to most tables, holding the row's creation timestamp. Thanks in advance, -- Louis-David Mitterrand -

[SQL] Speed or configuration

2000-08-20 Thread Franz J Fortuny
At our company we are presently using a commercial database that generates results from this query: select xx1,xx2,xx3 from tableX where field1 in (select field1 from tableY where field2=NNN and field3=NNN2 and field4=NNN4) tableX has 790,000 rows, and an index on field1 tableY has abou 175,000