Re: [SQL] case sensitive/insensitive confusion

2005-02-01 Thread Peter Eisentraut
Christoph Haller wrote: It seems to me under hpux the sort is done case sensitive, as would one expect on SQL_ASCII encoding, whereas under linux a case insensitive sort is done. The sort order depends entirely on the locale that you specify to initdb (not the encoding). Please check the

Re: [SQL] case sensitive/insensitive confusion

2005-02-01 Thread Christoph Haller
Peter Eisentraut wrote: Christoph Haller wrote: It seems to me under hpux the sort is done case sensitive, as would one expect on SQL_ASCII encoding, whereas under linux a case insensitive sort is done. The sort order depends entirely on the locale that you specify to initdb (not the

Re: [SQL] case sensitive/insensitive confusion

2005-02-01 Thread Theodore Petrosky
I seem to have a problem with controlling the locale. Mac os x, postgresql 8.0.1 ./configure --with-rendezvous --enable-thread-safety --enable-locale but when I try: initdb --locale=es_ES ~/testdb I get: The files belonging to this database system will be owned by user postgres. This user

Re: [SQL] BLOBs vs BYTEA

2005-02-01 Thread Karl Denninger
On Tue, Feb 01, 2005 at 10:04:45AM +0200, Achilleus Mantzios wrote: O Dennis Sacks Ýãñáøå óôéò Jan 31, 2005 : Sam Adams wrote: Anyway, I was wondering which would be a better way to store a large amount of files each a few megabytes in size. There could be hundreds of thousands of

Re: [SQL] MSSQL versus Postgres timing

2005-02-01 Thread Scott Marlowe
On Tue, 2005-02-01 at 10:54, Joel Fradkin wrote: All is moving along well. I have all my views and data and am testing things out a bit. A table with 645,000 records for associates has view (basically select * from tblassociates where clientnum = test) What does explain analyze select *

[SQL] MSSQL versus Postgres timing

2005-02-01 Thread Joel Fradkin
All is moving along well. I have all my views and data and am testing things out a bit. A table with 645,000 records for associates has view (basically select * from tblassociates where clientnum = test) This is taking 13 seconds in postgres and 3 seconds in MSSQL. I tried making an

Re: [SQL]

2005-02-01 Thread Dennis Sacks
Iain wrote: hi, I'm not familiar with iso2709 but there is a program called Octopus that may do what you want. It's open source software and can be found at octopus.enhydra.org - worth a try anyway. ISO2709 is very similar to MARC records as used by libraries. Its most

Re: [SQL] MSSQL versus Postgres timing

2005-02-01 Thread Michael Fuhr
On Tue, Feb 01, 2005 at 11:54:11AM -0500, Joel Fradkin wrote: A table with 645,000 records for associates has view (basically select * from tblassociates where clientnum = 'test') This is taking 13 seconds in postgres and 3 seconds in MSSQL. Please post the EXPLAIN ANALYZE output for the

Re: [SQL] MSSQL versus Postgres timing

2005-02-01 Thread Bricklen Anderson
Michael Fuhr wrote: On Tue, Feb 01, 2005 at 11:54:11AM -0500, Joel Fradkin wrote: A table with 645,000 records for associates has view (basically select * from tblassociates where clientnum = 'test') This is taking 13 seconds in postgres and 3 seconds in MSSQL. Please post the EXPLAIN ANALYZE

Re: [SQL] case sensitive/insensitive confusion

2005-02-01 Thread Tom Lane
Theodore Petrosky [EMAIL PROTECTED] writes: Mac os x, postgresql 8.0.1 initdb --locale=es_ES ~/testdb ... The database cluster will be initialized with locale es_ES. initdb: could not find suitable encoding for locale es_ES Rerun initdb with the -E option. I looked into this and find that

Re: [SQL] MSSQL versus Postgres timing

2005-02-01 Thread Joel Fradkin
QUERY PLAN Merge Join (cost=47489.81..47975.65 rows=3758 width=111) (actual time=27167.305..29701.080 rows=85694 loops=1) Merge Cond: (outer.locationid = inner.locationid) - Sort (cost=1168.37..1169.15 rows=312 width=48) (actual time=261.096..262.410 rows=402 loops=1) Sort Key:

Re: [SQL] MSSQL versus Postgres timing

2005-02-01 Thread Joel Fradkin
With seq scan on. -Original Message- From: Michael Fuhr [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 01, 2005 12:07 PM To: Joel Fradkin Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] MSSQL versus Postgres timing On Tue, Feb 01, 2005 at 11:54:11AM -0500, Joel Fradkin wrote: A

Re: [SQL] MSSQL versus Postgres timing

2005-02-01 Thread Joel Fradkin
-Original Message- From: Michael Fuhr [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 01, 2005 12:07 PM To: Joel Fradkin Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] MSSQL versus Postgres timing On Tue, Feb 01, 2005 at 11:54:11AM -0500, Joel Fradkin wrote: A table with

Re: [SQL] MSSQL versus Postgres timing

2005-02-01 Thread Joel Fradkin
View and table creates CREATE TABLE tblassociate ( clientnum varchar(16) NOT NULL, associateid int4 NOT NULL, associatenum varchar(10), firstname varchar(50), middleinit varchar(5), lastname varchar(50), ssn varchar(18), dob timestamp, address varchar(100), city varchar(50),

Re: [SQL] MSSQL versus Postgres timing

2005-02-01 Thread PFC
CREATE OR REPLACE VIEW viwassoclist AS SELECT a.clientnum, a.associateid, a.associatenum, a.lastname, a.firstname, jt.value AS jobtitle, l.name AS location, l.locationid AS mainlocationid, l.divisionid, l.regionid, l.districtid, (a.lastname::text || ', '::text) || a.firstname::text AS

Re: [SQL] MSSQL versus Postgres timing

2005-02-01 Thread Tom Lane
Joel Fradkin [EMAIL PROTECTED] writes: - Sort (cost=38119.24..38333.26 rows=85611 width=52) (actual time=20667.645..21031.627 rows=99139 loops=1) Sort Key: (a.clientnum)::text, a.jobtitleid - Seq Scan on tblassociate a

Re: [SQL] MSSQL versus Postgres timing

2005-02-01 Thread Joel Fradkin
I have added indexes for clientnum (and clientnum and unique identifier like jobtitleid for jobtitle table) to see if it would help sorry about it not matching. I gave you the definition outlined in PGadmin table window (I can add the indexes if it will help). It is still running slower even when

Re: [SQL] Calendar Function

2005-02-01 Thread Muhyiddin A.M Hayat
Ok, thanks But if i would like to displaydate in one Month, e.g : date infeb 2005

Re: [SQL] Calendar Function

2005-02-01 Thread Bradley Miller
You might need to get creative and do some functionality in another language, like C or PHP via the PL integration. (I know I just saw something for PHP . . . the question is can you use PHP functions ? ? ) On Feb 1, 2005, at 8:53 PM, Muhyiddin A.M Hayat wrote: Ok, thanks   But if i would

Re: [SQL] Calendar Function

2005-02-01 Thread Michael Fuhr
On Wed, Feb 02, 2005 at 10:53:09AM +0800, Muhyiddin A.M Hayat wrote: But if i would like to display date in one Month, You could use the given function with a few changes. For example, given an arbitrary date, you could use date_trunc() to find the first day of that date's month, add an

Re: [PERFORM] [SQL] OFFSET impact on Performance???

2005-02-01 Thread Sean Davis
On Jan 26, 2005, at 5:36 AM, Leeuw van der, Tim wrote: Hi, What you could do is create a table containing all the fields from your SELECT, plus a per-session unique ID. Then you can store the query results in there, and use SELECT with OFFSET / LIMIT on that table. The WHERE clause for this