[SQL] looking for empty fields

2003-08-06 Thread Jodi Kanter
Title: 



We recently upgraded from version 7.2.3 to 7.3.3 and seem to have some code
that has broken. We were doing checks in various locations looking for nulls
and/or empty fields. To search for empty fields we said something like 

select count(am_pk) from arraymeasurement where al_fk is null or al_fk='';

Is this not allowed anymore? All my check with the double ticks are failing.
I assume there is a difference in postgres between an empty and null field.
How can I check for both in 7.3.3?
Thanks
Jodi
-- 










___
Jodi L Kanter
 BioInformatics Database Administrator
 University of Virginia
 (434) 924-2846
[EMAIL PROTECTED]




 

 

 






Re: [SQL] [GENERAL] Postgresql slow on XEON 2.4ghz/1gb ram

2003-08-06 Thread Maksim Likharev
What OS, if Linux what kernel

-Original Message-
From: Wilson A. Galafassi Jr. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 6:51 AM
To: [EMAIL PROTECTED]
Subject: [GENERAL] Postgresql slow on XEON 2.4ghz/1gb ram



Hello.
I have this problem: i'm running the postgre 7.3 on a windows 2000
server with  P3 1GHZ DUAL/1gb ram with good performance. For best
performance i have change the server for a  XEON 2.4/1gb ram and for  my
suprise the performance decrease 80%. anybody have a similar experience?
does exist any special configuration to postgre running on a Xeon
processor? Any have any idea to help-me? Excuse-me my bad english.
Very Thanks
Wilson
icq 77032308
msn [EMAIL PROTECTED]
 


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[SQL] Analyze makes queries slow...

2003-08-06 Thread Stef
Hi all,

I have a problem :

A select statement that selects from 7 tables,
groups the information by 6 columns of the
tables involved.

When there are no rows in pg_statistics,
the query runs under 3 minutes.

When I analyze the biggest table of the 7
(approx 100 rows), the query takes longer than
12 Hours (Had to kill it eventually).

I have the explain plan of the original, under 3 minutes
query, and would like to reverse engineer this, to
build up a query with proper join statements, as I understand
that this is a way of forcing the planner to join the table
in a faster way.

I got very close a couple of times, but still can't get it 100%
the same as what the planner did prior to analyzing.

The database is actually faster when analyzed, except
for two or three multiple join queries (which don't finish
after analyze) So I would like to make an exception
for the tables that are used in these queries only,
or do proper joins.

Can anybody help, or give some links to good 
help resources?

TIA
Stefan

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[SQL] Timestamp in PG - 7.1 & 7.2

2003-08-06 Thread Anagha Joshi








Hi,

I’ve observed this:

Here is output from PostgreSQL 7.1.2:

 

trapdb=# select cast(datetime(1057637700) as timestamp);
 ?column? 

---
 2003-07-08 09:45:00+05:30
(1 row)

 

Here is output from PostgreSQL 7.2.4:

 

trapdb=# select cast(datetime(1057637700) as timestamp);
 timestamp
---
 2003-07-07 22:45:00+05:30
(1 row)

 

I’ve migrated from PG - 7.1.2 to 7.2.4.

 

My timezone is set as “IST” in both cases.

Is this any version problem or  I’m missing any envirnonment setting?

 

Help is appreciated….

 

Thanks,

Anagha

 








Re: [SQL] [PERFORM] EXTERNAL storage and substring on long strings

2003-08-06 Thread Scott Cain
Joe,

Good idea, since I may not get around to profiling it this week.  I
created a dump of the data set I was working with.  It is available at
http://www.gmod.org/string_dump.bz2

Thanks,
Scott


On Mon, 2003-08-04 at 16:29, Joe Conway wrote:
> Is there a sample table schema and dataset available (external-storage 
> case) that we can play with?
> 
> Joe
-- 

Scott Cain, Ph. D. [EMAIL PROTECTED]
GMOD Coordinator (http://www.gmod.org/) 216-392-3087
Cold Spring Harbor Laboratory


---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [SQL] [PERFORM] EXTERNAL storage and substring on long strings

2003-08-06 Thread Joe Conway
Scott Cain wrote:
Oh, and I forgot to mention: it's highly compressed (bzip2 -9) and is
109M.
Thanks. I'll grab a copy from home later today and see if I can find 
some time to poke at it.

Joe



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]