Thread: UFS Logging on Solaris 8

UFS Logging on Solaris 8

From
"Fernando Papa"
Date:
Hi everybody!

We are planning a fresh instalation over Solaris 8. And I have a couple
of questions about UFS Logging:
1) Do you have any experience/problems with this filesystem?
2) performance could be better than "plain" UFS?
3) We have 4 physical 18GB Disk. We are thinking about the layout: One
physiscal disk for O.S. and the other disk for Database. And the two
other disks will be mirror (with DiskSuite). This could be good for
start?

I know, solaris is not the best platform to run postgresql, but I'ts the
only we have now.

Thanks a lot!

--
Fernando O. Papa
DBA

Re: UFS Logging on Solaris 8

From
Andrew Sullivan
Date:
On Thu, May 22, 2003 at 05:19:33PM -0300, Fernando Papa wrote:

> 1) Do you have any experience/problems with this filesystem?

No.

> 2) performance could be better than "plain" UFS?

Not really, and it may be slower.

> 3) We have 4 physical 18GB Disk. We are thinking about the layout: One
> physiscal disk for O.S. and the other disk for Database. And the two
> other disks will be mirror (with DiskSuite). This could be good for
> start?

One for OS, "one for Database" as in the binary?  Put the binary on
the OS's disk.  Put WAL on its own disk (or at least, on a different
disk than the data storage areas).  The performance is much better
that way.

> I know, solaris is not the best platform to run postgresql, but I'ts the
> only we have now.

Some people report that Linux is actually faster than Solaris on the
various SPARCs.  I have my doubts, but I haven't tried.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


Query Output Formatting - Y/N Depending On Count

From
"Cameron B. Prince"
Date:
Hi,

I need to output a Y or N depending on a count being greater than 0 or not.
I think I've seen a co-worker at a pervious job do something like this, but
I am unable to find any examples on the list or in the docs.

Here's my query:

SELECT a.col, COUNT(DISTINCT b.col) AS col_count
FROM table1 a
LEFT OUTER JOIN table2 b
ON a.col=b.col
GROUP BY a.col

So what I'm looking for is col_count to contain a Y if the count is greater
than 0, else an N.

Anyone know how to do this?

Thanks,
Cameron


Re: Query Output Formatting - Y/N Depending On Count

From
"scott.marlowe"
Date:
You want case:

select a,
  case
    when a=0 then 'Y'
    else 'N'
  end
from test;

On Fri, 23 May 2003, Cameron B. Prince wrote:

> Hi,
>
> I need to output a Y or N depending on a count being greater than 0 or not.
> I think I've seen a co-worker at a pervious job do something like this, but
> I am unable to find any examples on the list or in the docs.
>
> Here's my query:
>
> SELECT a.col, COUNT(DISTINCT b.col) AS col_count
> FROM table1 a
> LEFT OUTER JOIN table2 b
> ON a.col=b.col
> GROUP BY a.col
>
> So what I'm looking for is col_count to contain a Y if the count is greater
> than 0, else an N.
>
> Anyone know how to do this?
>
> Thanks,
> Cameron
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


Re: Query Output Formatting - Y/N Depending On Count

From
Martijn van Oosterhout
Date:
On Fri, May 23, 2003 at 03:06:13PM -0500, Cameron B. Prince wrote:
> Hi,
>
> I need to output a Y or N depending on a count being greater than 0 or not.
> I think I've seen a co-worker at a pervious job do something like this, but
> I am unable to find any examples on the list or in the docs.

Use a CASE statement:

CASE WHEN COUNT(DISTINCT b.col) = 0 THEN 'N' ELSE 'Y' END

> Here's my query:
>
> SELECT a.col, COUNT(DISTINCT b.col) AS col_count
> FROM table1 a
> LEFT OUTER JOIN table2 b
> ON a.col=b.col
> GROUP BY a.col
>
> So what I'm looking for is col_count to contain a Y if the count is greater
> than 0, else an N.
>
> Anyone know how to do this?
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> "the West won the world not by the superiority of its ideas or values or
> religion but rather by its superiority in applying organized violence.
> Westerners often forget this fact, non-Westerners never do."
>   - Samuel P. Huntington

Attachment