st create separate indexes and you will be fine, especially given
the very small size of the table. If you find your queries going slow, you
could start investigating compound indexes (or in this case, partial
indexes).
- --
Greg Sabino Mullane g...@turnstep.com
End Point Corporation http://www.end
of Postgres and the latter does carry a
potential performance penalty).
- --
Greg Sabino Mullane g...@turnstep.com
PGP Key: 0x14964AC8 201204251322
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-BEGIN PGP SIGNATURE-
iEYEAREDAAYFAk+YM6IACgkQv
d be 'less' than 0102 because
it's January, etc. Assuming you change it to MMDD, you could run
a simple query like this:
SELECT tablename
FROM pg_tables
WHERE tablename ~ '^tmp_staging'
AND substring(tablename from '\d+')::date < now() - '10 days
possibly use advisory locks if you really need to
know what another session is listening to.
- --
Greg Sabino Mullane g...@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201106011822
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-
Forget my previous post. I am stupid. It doesn't work with 8.3.7, sorry
to trouble you.
--
Greg Quinn
Australian Phenomics Facility
greg.qu...@anu.edu.au
(02) 61259407
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
M...
^
test=#
Tried this with 8.4 and 9.0rc1, same result. Any help (even to tell me
that I'm an idiot!) would be much appreciated. In the meantime my query
will revert to Plan A, but it would be so much neater using a 'with'.
--
Greg Quinn
Australian Phenomics Facility
form_record_details table
please tell me this is fixed since 8.3
Greg
#x27;m confused, I thought it was volatile and strict that prevented inlining.
--
greg
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
The immutable property had nothing to do with caching results. Postgres
never caches the results of functions. The immutable property is used top
determine if it's safe to use indexes or other plans that avoid evaluating
an expression repeatedly.
On 6 Mar 2010 02:45, "Petru Ghita" wrote:
-BE
1 row)
postgres=# select i from (select i, dense_rank() over (order by i
desc) as r from i) as x where r = 2;
i
99
(1 row)
--
greg
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
a.it
aeo...@hotmail.com
a.fisched...@t-online.de
aflores3...@gmail.com
afr...@advancedneurosurgeons.com
agave...@comcast.net
agelsin...@amirsys.com
agis1...@yahoo.gr
--
greg
http://mit.edu/~gsstark/resume.pdf
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make c
sed solution.
It also supports an extension which could be even more efficient than
all of them:
select DISTINCT ON (id) from tt order by id,create_date desc
If you have an index on (Or if you have an index
on and use "order by id desc, create_date desc" in
the query) then this
weren't already having a
problem with that in <8.2.11 then perhaps you would be ok.
--
greg
http://mit.edu/~gsstark/resume.pdf
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
postgres and making a
"boolean" domain in Oracle for char(1) and then write all sql to
compare with = 'f' and = 't'. It's annoying you can't use "WHERE
foo_flag" and have to write "WHERE foo_flag = 't'" but otherwise that
would give
3 - because L3 is higher than L2 and ratio of L3 : L2 isĀ 2 : 1
Are you just looking for the most frequent seg for each customer?
select distinct on (customer) customer,seg
from (select customer, seg, count(*) as n from tab group by seg)
order by customer, n desc
That doesn't give th
t the postgres
shared buffers and worse, it does affect other buffers that probably
would still be cached.
The best answer is usually to build a test configuration large enough
that it has similar cache effects as your production environment. Then
test random values and repeat the test many time
ng the
temporary hash we build up - I think the version I emailed neglected to do that.
Wouldn't want those numbers to stick around in the session.
- --
Greg Sabino Mullane g...@turnstep.com
End Point Corporation
PGP Key: 0x14964AC8 200904061028
http://big
ECT ..." | perl -pe 's/^\n// if $.<2'
This strips a newline from the first line only of the output, and
only if the line consists of nothing else. Highly recommended
for cron.
- --
Greg Sabino Mullane g...@turnstep.com
End Point Corporation
PGP Key: 0x14964AC8 20090
ENABLE TRIGGER update_assoc_count_insert");
## x3 etc.
spi_exec_query("ALTER TABLE assoc DISABLE TRIGGER update_assoc_count_perl");
-- Put FK magic here
return 'Bulk load complete';
$_$;
- -- Usage:
SELECT start_bulkload_assoc_count();
- -- Lots of inserts a
Huh, I didn't realize that ever worked in the past. I thought the way
to do what the op describes was to cast it to text[] or whatever
datatype you from out-of-band knowledge to expect.
--
Greg
On 13 Dec 2008, at 19:38, Tom Lane wrote:
Corey Horton writes:
I'm try
COUNT(hit_id) AS total_hits
FROM (
SELECT partner_id, hit_id, NULL AS view_id FROM hits
UNION ALL
SELECT partner_id, NULL, view_id FROM views
) AS foo
GROUP BY 1;
- --
Greg Sabino Mullane [EMAIL PROTECTED]
End Point Corporation
PGP Key: 0x14964AC8 200806251019
http://biglum
= 456;
INSERT INTO foo SELECT * FROM tempfoo;
COMMIT;
- --
Greg Sabino Mullane [EMAIL PROTECTED]
End Point Corporation
PGP Key: 0x14964AC8 200803200737
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-BEGIN PGP SIG
:
SELECT * FROM yourtable
ORDER BY
CASE
WHEN X::date = now()::date THEN 1
WHEN X::date < now()::date THEN 2
WHEN X IS NULL THEN 3
ELSE4
END,
CASE
WHEN X::date-now()::date < 0 THEN now()-X
ELSE X-now()
END;
- --
G
(From the pgadmin documentation)
"The maintenance DB field is used to specify the initial database
that pgAdmin connects to, and that will be expected to have the pgAgent
schema and adminpack objects installed (both optional). On PostgreSQL
8.1 and above, the maintenance DB is normally called '
warning. Anyway, thanks for the heads-up.
Alvaro Herrera wrote:
Greg Toombs wrote:
What disaster do you foresee? Is that version unstable?
Yes. There are known, unfixed bugs, and architectural problems
that cannot be fixed.
What disaster do you foresee? Is that version unstable?
Tom Lane wrote:
Greg Toombs <[EMAIL PROTECTED]> writes:
After reading a few more methods of doing things, I went with the
simplest one, as 1. time is of the essence, and 2. I'm stuck with
PostgreSQL 7.1 on the se
y key of the parent class to a serial. Children have an
integer column with constraints as the primary key and foreign key to
the parent primary key column.
Thanks again,
- Greg
Steve Midgley wrote:
Hi Greg,
While not in a C++ framework, you might find that it's not too hard to
implement
h a trigger?)
Any advice will be appreciated! As I'm relatively new to Postgre, I
might need some help with the actual implementation as well.
Thank you.
- Greg
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
> I need to create some nearly identical copies of rows in
> a complicated table.
>
> Is there a handy syntax that would let me copy a existing row,
> but get a new primary key for the copy?
http://people.planetpostgresql.org
g:
=> select init_testdata_a(1);
works
=> select init_testdata_b(2);
"
PL/pgSQL function "init_testdata_b" line 13 at execute statement
ERROR: relation "testdata_2" does not exist
CONTEXT: SQL statement "
...
Any thoughts?
-Greg
-
s to do a fair amount of work
to eliminate duplicates. If you know the rows are going to be distinct or if
you don't care about duplicates you can save a lot of time by using UNION ALL
instead.
--
greg
---(end of broadcast)---
TIP 9: In versions be
of them.
Also, incidentally, I don't see how a table of possible keys could help you
here. Nothing forces they table MRTPContactValue to use all possible keys...
--
greg
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
corrupted by uppercasing, declared case
insensitive, declared private information that couldn't be leaked, and
declared offensive words that had to be updated. Each of which is a pain to
deal with when it's your primary key.
--
greg
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
refer. I don't think there's any plans to remove the option, it's just not
the default any more.
--
greg
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
t explicitly every time anyways.
One day you'll need more flexibility or you'll have someone else reading the
code and you'll be glad you're not hiding what's going on and hard coding
column names inside some macro function anyways.
--
greg
---(
f the checkout?
In any case the where clause isn't all that complex. I think you've confused
yourself by drawing the inverse table of what you need. You need the range of
CO to expire for a given N, not the range of N in which you should expire a
given CO.
WHERE co BETWEEN 0 AND
here date_trunc('week',time)=date_trunc('week',dailydata.time)
order by time asc
limit 1
) as weeklyopen,
(select close
from dailydata as d
where date_trunc('week',time)=date_trunc('week',d
at ANALYZE results for the
query and try raising work_mem for this query using SET until you see the plan
using a hash aggregate. If it can use a hash aggregate for your query (more
likely for the first query than the second) without swapping it'll be faster
than sorting.
--
greg
Tom Lane <[EMAIL PROTECTED]> writes:
> Greg Stark <[EMAIL PROTECTED]> writes:
> > "Jesper K. Pedersen" <[EMAIL PROTECTED]> writes:
> >> Having checked the I/O format it seems that MS Access exports the
> >> values of a YESNO field as 0 and 1
"Jesper K. Pedersen" <[EMAIL PROTECTED]> writes:
> Having checked the I/O format it seems that MS Access exports the
> values of a YESNO field as 0 and 1
If only Postgres's boolean type were as helpful.
--
greg
---(end of broadcast)--
same as "= ANY" so "1 IN (1,2,NULL)" is the same as
"1=1 OR 1=2 OR 1=NULL" which is true even though the last of the three is null.
--
greg
---(end of broadcast)---
TIP 6: explain analyze is your friend
me fixed list of predetermined
columns. One the other side is the decidely non-relational model where you
just store a large hunk of xml text.
What you're looking for is one of the many systems that attempt to bridge
these two extremes and provide the best of both worlds.
--
gre
$filename" does not exist\n});
return localtime($^T - (60*60*24* -M _));
$$;
SELECT filemodtime('/var/log/messages');
SELECT filemodtime('/dark/matter');
--
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 20051457
http://biglumber.com/x/web?pk=252
be a wonderful feature for Postgres.
--
greg
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
ld be transformed into the equivalent join (or
some more general join structure that can cover both sets of semantics) and
then planned through the same code path. In an ideal world the user should be
guaranteed that equivalent queries would always result in the same plan
regardless of how they
"Anthony Molinaro" <[EMAIL PROTECTED]> writes:
> Greg,
> You'll have to pardon me...
>
> I saw this comment:
>
> "I don't see why you think people stumble on this by accident.
> I think it's actually an extremely common need."
"Anthony Molinaro" <[EMAIL PROTECTED]> writes:
> By changing the values in the select/group by you are changing
> Group! How can you arbitrarily add or exclude a column?
> You can't do it.
Go back and reread the previous posts again. You mis
ubselects have their own problems here. Mainly Postgres's optimizer, as good
as it is, doesn't treat them with the same code paths as joins and can't find
all the same plans for them. But in any case you cannot always write a
subselect that's equivalent to an arbitrary join.
--
interval '1 month'
ELSE false
END CASE
AND ...
There's no advantage to doing this kind of thing though. Good database design
principles dictate having one column for each piece of data. Just leave the
columns for which the data is inappropriate NULL. NULLs ta
feature.
MySQL treats "select a,b from t group by a" equivalently to Postgres's
"select distinct on (a) a,b from t"
I suppose "equivalent" isn't quite true. It's more general since it allows
aggregate functions as well. The equivalently general Postgres syntax i
Aha ! A gamer... playing with armor and hit points and things
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Frank Bax
Sent: Tuesday, October 11, 2005 1:06 PM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] SEVEN cross joins?!?!?
At 08:29 AM 10/1
t switches involved in communicating those records,
but there's no way it would let the server avoid reading all those records
from disk.
At least as far as I can see.
--
greg
---(end of broadcast)---
TIP 6: explain analyze is your friend
add another column. But generally, this
should be the exception and not the rule.
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200509122031
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-BEGIN PGP SIGNATURE-
iD8DBQFDJh99vJuQZxSWSsgRAiRFAJwKiGVsJhcbxI
SET parent_fk = 4 WHERE child_fk = 3 AND parent_fk = 2;
SELECT 'Add non-mother/father' AS "Test should pass";
INSERT INTO relations VALUES (3,5);
SELECT 'Change non-mother/father to mother' AS "Test should fail";
UPDATE relations SET parent_fk = 2 WHER
the data to be easily and freely accessible as
> > specific objects, but I do not wish to provide an easy way of
> > dumping all of the data as a unit.
Of course you could have just done the same thing using an hmac (or a simple
hash like crypt) and not had to store an extraneous meaningless piece of
information in your database.
--
greg
---(end of broadcast)---
TIP 6: explain analyze is your friend
easiest to
pg_dump the whole database and then drop/rename columns in the new
database.
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200508310915
https://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-BEGIN PGP SIGNATURE-
iEYEARECAAYFAkMVrhIACgkQvJuQ
IMHO: It's not necessarily the job of the RDBMS to be responsible for
formatting and cleaning of your data... This is a job better suited for the
application layer and the data model...
The RDBMS should only be responsible for enforcing constraints on the
data... not validating or purifying the d
would live outside of
transactions and be able to create transactions, commit, and roll them back.
But I don't think any of that work is committed yet. I'm not even sure it's
been written yet.
--
greg
---(end of broadcast)---
TIP 6: explain analyze is your friend
any (monthly_balance);
This would require a GiST index. Look at the intarray contrib module. I don't
think there's any equivalent for other data types. You might have to store
these values as fixed precision numbers and divide or multiple by 100 to
convert.
--
greg
--
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
> fair enough. but a simple order by id would never work.
That was me, sorry, I must have been asleep when I wrote it. :)
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200506300636
http://biglumber.com/x/web
work, you will have to be more specific and send us
the exact query.
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200506282010
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-BEGIN PGP SIGNATURE-
iD8DBQFCwedPvJuQZxSWSsgRAsC0AKD2UrMtQJ6RRxbeZ8J2n6
the high number of combinations and large
potential for change.
> table ordered_products: order_id, product_id, quantity
I'm not sure where you are getting "quantity" from: as near as I
can tell, this will always be a quantity of 1: one person ordering
one item.
#x27;s not a syntax error.
--
greg
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
E seq2 > 2
GROUP BY fkey, seq2
ORDER BY 1,2,3;
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200506250237
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-BEGIN PGP SIGNATURE-
iD8DBQFCvPwJvJuQZxSWSsgRAtcHAKDzl67Va8ABP4qyNpvFtWDpjmT/iwCg3D5J
k
, but would this do what you want?:
SELECT fkey, uid, seq2, min(seq1)
FROM my_table
WHERE seq2 > 2
GROUP BY fkey, uid, seq2
ORDER BY 1,2,3;
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200506250019
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
--
good practice for the 8.1.0 jump, right? :)
Overall, I was able to get the query to go about a third faster
than when I started. Hope this helps.
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200506242328
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9
+--
99120 | 338
92110 | 120
92190 | 41
If you do need the other rows, you will have to specify a way of ordering
the rows within a code group.
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200506161458
http://biglumber.com/x/web?pk=2529DF6AB8F79407E944
st: just come up with a standard naming scheme, such as:
"tablename|colname|is_not_unique"
which should be human and machine parseable (perl example):
if ($error =~ m#^(.+)\|(.+)\|is_not_unique$#o) {
die qq{Whoops : looks like column "$2" of table "$1" needs
name the table constraints yourself with a descriptive name, so you
always know exactly what is going on:
greg=# create table unitest(a int, b text);
CREATE TABLE
greg=# alter table unitest add constraint "unitest_column_a_is_not_unique"
unique(a);
NOTICE: ALTER TABLE / ADD UNIQUE wi
d by the GROUP BY column and avoids the extra
sort which could cause you problems.
So this is not guaranteed by the SQL spec to work (but then the SQL spec
doesn't have custom aggregates at all) but Postgres goes out of its way to
make sure this doesn't break unnecessarily.
[This is
x27;)::int AS newid, * FROM
fruit ORDER BY lower(description);
ALTER TABLE newfruit DROP COLUMN id;
ALTER TABLE newfruit RENAME COLUMN newid TO id;
DROP TABLE fruit;
ALTER TABLE newfruit RENAME TO fruit;
DROP SEQUENCE fruit_seq;
COMMIT;
SELECT * FROM fruit ORDER BY id ASC;
- --
Greg Sabino Mulla
a for READ
COMMITTED mode, but I think I'm on the same general path as you.
--
greg
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
participate in any
transactional issues like keeping old versions of records around.
--
greg
---(end of broadcast)---
TIP 8: explain analyze is your friend
e of quoting issues if "dont" is coming from user supplied inputs.
--
greg
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
tual time
of the event, and a second column with the local time zone in which you can
choose to use to display the time?
--
greg
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
There's a difference between "natural" order (the location in the database
or on disk) and "record" order (the order specified by the primary key)...
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Chris Browne
Sent: Wednesday, March 30, 2005 3:04 PM
To
change:
update pg_constraint set condeferrable = 't' where contype = 'f'
update pg_trigger set tgdeferrable=true where tgisconstraint = true
I think an ALTER CONSTRAINT to change these settings as well as the
ON {UPDATE,DELETE} behaviour would be neat.
--
greg
-
27;),'/') FROM mytable;
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200503232033
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-BEGIN PGP SIGNATURE-
iD8DBQFCQhkMvJuQZxSWSsgRAjTaAJ9zmgSOBH/Nre/XMw+JajBni8YyDwCg1DyV
Cd5rIhi026KFoFZEFjMOY
ct equivalent to rank(), but there are certainly
other ways to get the results. The above query can be written in
PostgreSQL as:
SELECT employee_id, last_name, salary
FROM employees
WHERE salary =
(SELECT DISTINCT salary FROM employees ORDER BY salary DESC OFFSET 2 LIMIT 1);
- --
Greg Sabino Mul
How about a user defined function ???
CREATE OR REPLACE FUNCTION harwareupdate(integer, integer) RETURNS BOOLEAN
AS '
update pieces set p_name = \'LSALES1\', p_location = \'Mike Haley\',
p_site = \'L\' where p_id = $1;
update pieces set p_name = \'SPARE\', p_location = \'spare\', p_
l_count>1 to make it
worthwhile.
The only reason you might have a problem is if it's really "semantically
wrong" which would be if there's data attached to Apple or Orange that might
be different from one streak of results to the other.
--
greg
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
you put "not a=6" in your select column list you'll see the true and false
values appear.
--
greg
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
foreign keys and primary keys have to be defined as unique at the table /
column level if you want to implement a check constraint -- your contrived
example doesn't stand up all that well -- If you want to use constraints --
then your database schema should conform to traditional RDBMS theory a
rt_time IS NULL THEN 0 ELSE 1 END, start_time
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200502152309
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-BEGIN PGP SIGNATURE-
iD8DBQFCEseYvJuQZxSWSsgRAlipAJwKAyqAyLbo9hfpoWkz0SOlTY3feACfa+ng
DqNY4DAJ5T
e.
And b) lower random_page_cost. random_page_cost tells postgres how much slower
indexes are than table scans and at the default setting it accurately
represents most disk hardware. If your database fits within RAM and is often
cached then you might have to lower it to mod
Total runtime: 1034.434 ms"
Well that says it only took 1s. So it seems this is highly dependent on
whether the data is in cache. Perhaps it was in cache on MSSQL when you
profiled it there and not on postgres?
You could put an index on clientnum, but if the data is usually in cache like
this it m
"Joel Fradkin" <[EMAIL PROTECTED]> writes:
> I also tried a simple select * from tblcase where clientum = 'SAKS'
Try:
explain analyze select * from tblcase where clientum = 'SAKS'
Send the output.
--
greg
---(end of broa
vantage if the data were stored in a temporary table
marked as not having to be WAL logged. Instead it could be automatically
cleared on every database start.
--
greg
---(end of broadcast)---
TIP 6: Have you searched our list archiv
Isn't this a prime example of when to use a servlet or something similar
in function? It will create the cursor, maintain it, and fetch against
it for a particular page.
Greg
-Original Message-
From: Richard Huxton [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 20, 2005 10:21
ill always come to the same postgres session and has some
garbage collection if the user disappears. And it means the URL is only good
for a limited amount of time. If they bookmark it it'll break if they come
back the next day.)
--
greg
---(end of broadcast)---
terrupted without losing work.
Oh, and this won't work if you have any external references to these values
from outside your database. Say if the value is something like a customer
account number that you've previously sent to customers...
--
greg
---(end o
ting a constraint
> similar to the original poster's and not realising it has no effect.
well
WHERE foo IN (null, ...)
returns null if foo isn't explicitly in the list (ie, "it may or may not equal
the unknown value in the list"). And I think constraints that retur
onnect to the
database and do the batch jobs.
They can output progress logs or keep information about their progress in some
shared space. They can also control the transaction more freely committing in
the middle of the job if it's safe.
--
greg
---(end of broad
e expecting.
What string? That's just integer arithmetic.
--
greg
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
less of what page is being fetched. Yours will perform more
and more slowly as the user gets deeper into the results.
Note that both queries are wrong however. You need an "ORDER BY itemkey" or
else nothing guarantees the second page has any relation at all to the first
page.
--
greg
;explain verbose" use "explain analyze". I don't know if it was in
7.1 but you say you reproduced the problem with 7.4. It would be helpful to
see the results of "explain analyze select ..." on the query before and after
the vacuum analyze.
--
greg
tablespace
FROM pg_catalog.pg_database
JOIN pg_catalog.pg_tablespace t ON (dattablespace=t.oid)
ORDER BY 1;
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200411022120
-BEGIN PGP SIGNATURE-
iD8DBQFBiFTSvJuQZxSWSsgRApflAJ0RiVndbc6u//cXX/S7uM8K91lWbgCfYVbC
tgres:
my @dbs = DBI->data_sources('Pg');
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200411012240
-BEGIN PGP SIGNATURE-
iD8DBQFBhwIHvJuQZxSWSsgRArd1AJ9hKXD+cSaM2L3RUXQdabuRofNFjwCfaHT0
+bRPuYhuED0mnlp1FRtvQQw=
=tsqe
-END PGP SIGNATURE
g records and will give an
error if there are multiple records instead of doing strange things.
Neither of these will be particularly pretty on the performance front.
--
greg
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
"C. Bensend" <[EMAIL PROTECTED]> writes:
> The risk of a cron gone wild is acceptable to me at this moment.
Gee, now I have images of late-night advertisements for bofh-porn video tapes
of Cron Jobs Gone Wild(tm) dancing through my head... thanks.
--
greg
---
1 - 100 of 201 matches
Mail list logo