Re: [GENERAL] Performance question (stripped down the problem)

2001-09-20 Thread Tille, Andreas
On Wed, 19 Sep 2001, Tom Lane wrote: > No. In the first place, there's no extra sort: the planner is well > aware that our current GROUP BY implementation produces ordered output. > In the second place, there's no guarantee that GROUP BY will always > produce ordered output in the future --- we

Re: [GENERAL] Performance question (stripped down the problem)

2001-09-20 Thread Tille, Andreas
On Thu, 20 Sep 2001, Herbert Liechti wrote: > I tried it. See my actions below. The main performance boost is > reached by creating an index and disabling the sequential scan: Thanks. I tried this and it helps in dead (see below). > --- > crea

Re: [GENERAL] null answer - how?

2001-09-20 Thread Patrick Welche
On Wed, Sep 19, 2001 at 11:34:56AM -0700, Stephan Szabo wrote: > > Are there no rows with timesliced<'01-May-2001'? I think in that > case sum() gives you one row with NULL. Thank you for the clue! *slaps forehead* transatlantic=# select min(stats_id),max(stats_id) from trans; min | max -

Re: [GENERAL] Performance question (stripped down the problem)

2001-09-20 Thread Tille, Andreas
On Thu, 20 Sep 2001, Justin Clift wrote: > Sorry, I haven't seen the history of this thread. One question which > might be relevant is, have you adjusted the postgresql.conf file from > the default memory settings to be something better? I adjusted two parameters: shared_buffers = 2048 (When I

Re: [GENERAL] Performance question (stripped down the problem)

2001-09-20 Thread Justin Clift
Hi Andreas, Sorry, I haven't seen the history of this thread. One question which might be relevant is, have you adjusted the postgresql.conf file from the default memory settings to be something better? If these are the times you're getting from a default configuration, you might be able to get

Re: [GENERAL] Performance question (stripped down the problem)

2001-09-20 Thread Tille, Andreas
On Thu, 20 Sep 2001, Einar Karttunen asked me for query plans for both M$ SQL and postgresql: M$ SQL: |--Compute Scalar(DEFINE:([Expr1002]=Convert([Expr1005]))) |--Stream Aggregate(GROUP BY:([Hauptdaten_Fall].[MeldeKategorie]) DEFINE:([Expr1005]=Count(*))) |--Index Scan(OBJE

Re: [GENERAL] Performance question (stripped down the problem)

2001-09-20 Thread Justin Clift
Hi Andreas, I'm running PostgreSQL 7.1.3 here on a PC with nearly a gig of ram, and running Linux Mandrake 8.0 First thing I did was to increase the amount of shared memory and stuff which Linux allows things to use : echo "kernel.shmall = 134217728" >> /etc/sysctl.conf echo "kernel.shmmax = 13

[GENERAL] Global constants

2001-09-20 Thread Mihai Gheorghiu
Can there be anything like global constants in PG? They should be seen by any session. E.g.: User rights are defined as int4's, with each bit representing an area where they have access. Testing this would be easier if I had constants like ISACCOUNTING, which I AND with the data in the rights fiel

Re: [GENERAL] Recreating indices safely

2001-09-20 Thread Denis Perchine
On Wednesday 19 September 2001 11:25, Tom Lane wrote: > Denis Perchine <[EMAIL PROTECTED]> writes: > > BTW, using begin; lock table; create index;drop index;commit; is not > > working, > > ?? > > regression=# create table foo (f1 text); > CREATE > regression=# create index fooi1 on foo(f1); > CREA

Re: [GENERAL] Global constants

2001-09-20 Thread Keary Suska
Setting up a table would be the most manageable, but if you don't want to do that you could create one or more functions to accomplish this. Keary Suska Esoteritech, Inc. "Leveraging Open Source for a better Internet" > From: "Mihai Gheorghiu" <[EMAIL PROTECTED]> > Date: Thu, 20 Sep 2001 16:58:0

[GENERAL] Custom Insert function

2001-09-20 Thread Brian C. Doyle
Hello all, Is it possible to create a function that would look like this_function('file.csv'); and make it run COPY this_table FROM '/this/location/file.csv' USING DELIMITERS ','; Thus eliminating alot of repeated work each time??? if so what would I put on the returns --

Re: [GENERAL] Second byte of multibyte characters causing trouble

2001-09-20 Thread Karen Ellrick
> The usual way to deal with this is to convert the J text from > S-JIS (which > will almost always cause problems) to either EUC-JP or UTF8 > encoding before > inserting it into the DB or otherwise messing with it. You can > then convert > it back to SJIS before sending it to the client. After r

Re: [GENERAL] Global constants

2001-09-20 Thread Peter Eisentraut
Mihai Gheorghiu writes: > Can there be anything like global constants in PG? CREATE TABLE my_constant ( val integer ); INSERT INTO my_constant VALUES ( 1024 ); -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)---

Re: [GENERAL] inet types and LIKE doesn't work as expected

2001-09-20 Thread Allan Engelhardt
Phil Mayers wrote: > Try this: > > hdbdev=> create table ips ( ip inet, ip_txt varchar(15) ); > hdbdev=> insert into ips (ip,ip_txt) values ('192.168.1.1','192.168.1.1'); > hdbdev=> select * from ips where ip like '192.168.1.1'; > ip | ip_txt > + > (0 rows) > > hdbdev=> select * from