Re: [GENERAL] Seeking datacenter PITR backup suggestions

2007-08-28 Thread Gregory Stark
f Postgres has used up all its existing WAL files it will have to create new ones which does have some performance cost. But otherwise it's unaffected. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Reliable and fast money transaction design

2007-08-29 Thread Gregory Stark
ion failures frequently? There's no reason for an individual transaction to take longer in SERIALIZABLE mode. In fact I believe SERIALIZABLE mode is actually measurably faster in benchmarks but haven't run one in READ COMMITTED mode recently (for that reason). -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Out of Memory - 8.2.4

2007-08-30 Thread Gregory Stark
alternative. > I think I went with bsearch mainly because I knew I could generate > the TID list already sorted. Somebody should try to measure the > probe time of the tidbitmap code against bsearch ... Incidentally, there was a previous discussion about this a while back. I can't see

Re: [GENERAL] E_BAD_ACCESS with palloc/pfree in base type

2007-08-31 Thread Gregory Stark
StringLength as sizeof() ought to give a compile-time error. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Instances where enable_seqscan = false is good

2007-09-03 Thread Gregory Stark
Index Cond: ((code)::text = 'NRN15'::text) So you might want to increase the statistics target for the "code" column. Incidentally the way this is written makes me wonder what data type "code" is defined as. -- Gregory Stark EnterpriseDB

Re: [GENERAL] Instances where enable_seqscan = false is good

2007-09-03 Thread Gregory Stark
"Ow Mun Heng" <[EMAIL PROTECTED]> writes: > On Mon, 2007-09-03 at 11:31 +0100, Gregory Stark wrote: >> "Ow Mun Heng" <[EMAIL PROTECTED]> writes: >> > >> > How can I persuade PG to use the index w/o resorting to setting seqscan >> &

Re: [GENERAL] Instances where enable_seqscan = false is good

2007-09-04 Thread Gregory Stark
t the explain analyze with and without enable_seqscan now that the stats are giving good predictions? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Controlling locale and impact on LIKE statements

2007-09-04 Thread Gregory Stark
ed just for the one database. There's not any standard definition of what indexes you'll need for all databases out there. Indexes aren't even in the SQL standard because they're part of performance tuning for each individual database engine. -- Gregory Stark EnterpriseD

Re: [GENERAL] Do AGGREGATES consistently use sort order?

2007-09-06 Thread Gregory Stark
thing is a general question. Yes. You can even do this with GROUP BY as long as the leading columns of the ORDER BY inside the subquery exactly matches the GROUP BY columns. In theory we can't promise anything about future versions of Postgres but there are lots of people doing this already s

Re: [GENERAL] Query with "like" is really slow

2007-09-07 Thread Gregory Stark
1627 (number of loops)? But even then I get 396407.161 ms, > which is still far away from the 532673.631 ms in the parent node. The nested loop still has to do some work. Actually it's quite possible that that extra overhead in nested loop is largely gettimeofday() calls fo

Re: [GENERAL] Do AGGREGATES consistently use sort order?

2007-09-06 Thread Gregory Stark
"Chris Browne" <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (Gregory Stark) writes: > >> You can even do this with GROUP BY as long as the leading columns of >> the ORDER BY inside the subquery exactly matches the GROUP BY >> columns. ... > Is there

Re: [GENERAL] Left joining table to setof function

2007-09-07 Thread Gregory Stark
e, selection_type). But your join condition is matching on (search_id, user_id, ***selected_value***, selection_type). I'm not sure what these columns are but this looks like a bug. Certainly it will make PostgreSQL less likely to use the index since it can only use the first two columns of it

Re: [GENERAL] Time Zone design issues

2007-09-11 Thread Gregory Stark
;s not much you can do with en_US or ru_RU. I think most big commercial sites that decide they need this just buy access to one of the ip to geographic location services which are far from perfect but in my experience are plenty good enough to get a reasonable time zone.

Re: [GENERAL] get a list of table modifications in a day?

2007-09-13 Thread Gregory Stark
a diff in that they tell you when the change occurred, what user made the change, and if multiple changes to the same record occurred you get a record of each. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--

Re: [GENERAL] Tablespaces on tertiary media

2007-09-14 Thread Gregory Stark
o access them (including autovacuum) then nothing will notice they're missing. But if you do try to access them you'll get an error. And if you leave it in this situation too long your database will shut down from getting too close to transaction wraparound. -- Gregory Stark

Re: [GENERAL] Tablespaces on tertiary media

2007-09-14 Thread Gregory Stark
h case you might want to avoid sequential scans if index scans would avoid accessing some segments.) -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please sen

Re: [GENERAL] NOT NULL Issue

2007-09-14 Thread Gregory Stark
"Gustav Lindenberg" <[EMAIL PROTECTED]> writes: > select * from security.users where length(us_username)=0; > Surely this a null. Surely not. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)-

Re: [GENERAL] Is this good spec for a PostgreSQL server?

2007-09-19 Thread Gregory Stark
oing to want the megaraid driver which is in the stock kernel tree but may or may not be compiled in your binary kernel distribution packages. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 9: In v

Re: [GENERAL] autovacuum

2007-09-20 Thread Gregory Stark
If you're writing data to the raid in large contiguous chunks then it you get higher bandwidth than RAID1+0. The problem with RAID5 is that if you're writing random access chunks then it's even slower than not having a raid at all. -- Gregory Stark Enterpris

Re: [GENERAL] Unique is non unique; no nulls

2007-09-22 Thread Gregory Stark
s of these queries say? select count(*),count(distinct suid) from mt; select suid,count(*) from mt group by suid having count(*) > 1; -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Unique is non unique; no nulls

2007-09-22 Thread Gregory Stark
but in the long term I think it would be better to know exactly what happened here. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] For index bloat: VACUUM ANALYZE vs REINDEX/CLUSTER

2007-09-24 Thread Gregory Stark
he index pages will have those few values left on them preventing them from being reused. If that's not your usage pattern then perhaps you should describe your usage pattern in more detail. But I suspect you would be best served by simply vacuuming much more often. -- Gregory Sta

Re: [GENERAL] table column reordering

2007-09-24 Thread Gregory Stark
o just thought of another scenario, I could've created a temp > table from a SELECT with the correct column order - wish I had > thought of that before writing this email. When you think of it put it in an email :) -- Gregory Stark EnterpriseDB http:/

Re: [GENERAL] lowering impact of checkpoints

2007-09-25 Thread Gregory Stark
ot; cycle in 8.2? I also wonder if it doesn't make more sense in 8.2 if your goal is to avoid drop-outs to just give up on the lru cycle entirely and set the delay to something like 60s and the all_percent to 100. Effectively saying to flush all dirty buffers once a minute to smooth th

Re: [GENERAL] subquery/alias question

2007-09-26 Thread Gregory Stark
lso write it using a subquery instead of a join SELECT * FROM ( SELECT dom_id, dom_name, (SELECT count(*) FROM users WHERE user_dom_id = dom_id) as nusers FROM domains ) as subq WHERE nusers > 0 ORDER BY dom_name But that will perform worse in many cases. --

Re: [GENERAL] DAGs and recursive queries

2007-09-26 Thread Gregory Stark
way you describe. It denormalizes the data for very fast but less flexible operations. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] DAGs and recursive queries

2007-09-27 Thread Gregory Stark
"Jeff Davis" <[EMAIL PROTECTED]> writes: > On Wed, 2007-09-26 at 16:54 +0100, Gregory Stark wrote: > >> You could check out the tablefunc contrib which includes a function called >> connectby() which implements a kind of recursive query. >> >> Alt

Re: [GENERAL] more problems with count(*) on large table

2007-09-28 Thread Gregory Stark
Because of MVCC: 'select count(*)' without >> WHERE-condition forces an seq. table-scan. > > But he does have a WHERE condition. THe problem is, probably, that the > condition is not selective enough so the planner chooses to do a > seqscan. What does EXPLAIN SEL

Re: [GENERAL] row->ARRAY or row->table casting?

2007-09-28 Thread Gregory Stark
ring to the column "r", it would look like SELECT (r).a from (select row(tab1.*)::tab1 as r from tab1)x; -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Vacuum/Analyze (suddenly) too slow

2007-09-30 Thread Gregory Stark
ld this have something to do with the lack of speed? That sounds about right. It's sampling 10x as much of the table and it's taking almost 10x as long... -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)---

Re: [GENERAL] more problems with count(*) on large table

2007-10-01 Thread Gregory Stark
I'm no expert on locking in Postgres, but AFAIK locks that prevent you > from reading records are rather rare and probably only issued from > userland code. Pages can be locked but never for very long. What other work is going on in this server? Is there anything which might be locking t

Re: [GENERAL] more problems with count(*) on large table

2007-10-01 Thread Gregory Stark
) > > Still stymied about the seemingly random performance, especially since I > have seen this query execute in 2 minutes. And the "explain analyze" for these? Are you still sure it's certain date ranges which are consistently problems and ot

Re: [GENERAL] more problems with count(*) on large table

2007-10-01 Thread Gregory Stark
ecords being randomly accessed. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] ERROR: variable not found in subplan target lists

2007-10-05 Thread Gregory Stark
ve made sense to have the driver do the variable substitution and execute the query without parameters. Also, if in the future we do handle multiple prepared plans for prepared statements it would run into this kind of problem. But then even in that case your solution still works. I'm just menti

Re: [GENERAL] Request: Anyone using bogus / "humorous" X-Message-Flag headers, could we please turn them off

2007-10-08 Thread Gregory Stark
e talking about order of 5 minutes downtime in exchange you avoid the risk of several data loss, data corruption, server cash, and security holes. Actually there are a few changes in 7.4.x that could require more work to upgrade. If your database locale is something like Hungarian or if you have

Re: [GENERAL] Request: Anyone using bogus / "humorous"X-Message-Flag headers, could we please turn them off

2007-10-08 Thread Gregory Stark
enerally it's just how Internet mailing lists work. There's some header you can add to your own emails to request mailers not add it. But I don't remember what it is. You can also tell majordomo not to forward you messages on the list to which you were cc'd. --

Re: [GENERAL] Generating subtotal reports direct from SQL

2007-10-09 Thread Gregory Stark
tunately the fancy SQL feature you're looking for is ROLLUP which Postgres doesn't support. I think you would have to do ( select id, code, amount from foo where code < 10 union all select null, code, sum(amount) from foo where code < 10 group by code ) order by code, id --

Re: [GENERAL] RES: 8.2.4 selects make applications wait indefinitely

2007-10-11 Thread Gregory Stark
ct the first or second half of the columns but put two copies of them in the column list. Are the client and server on two separate machines? Is it possible you have a network issue between these two machines (like pmtud problems, for example)? -- Gregory Stark EnterpriseDB

Re: [GENERAL] convert binary string to datum

2007-10-12 Thread Gregory Stark
s, don't refer to it directly. And unless you mark it with storage plain always detoast it before working with an argument or anything from heap_deform_tuple. In postgres we normally put pg_detoast_datum() directly into the DatumGetFoo() and PG_GETARG_FOO_P() macros. -- Gr

Re: [GENERAL] convert binary string to datum

2007-10-13 Thread Gregory Stark
"Ron Peterson" <[EMAIL PROTECTED]> writes: > 2007-10-13_08:50:56-0400 Ron Peterson <[EMAIL PROTECTED]>: >> 2007-10-13_01:22:06-0400 Gregory Stark <[EMAIL PROTECTED]>: > >> > And normally you would define your own datatype and not use bytea. >&

Re: [GENERAL] convert binary string to datum

2007-10-13 Thread Gregory Stark
"Ron Peterson" <[EMAIL PROTECTED]> writes: > I think I can get where I want to go without completely figuring that out > right now though... What are you trying to do? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com --

Re: [GENERAL] convert binary string to datum

2007-10-13 Thread Gregory Stark
using heap_form_tuple. And using a composite type is probably the right approach. Other utilities like pageinspect do use composite types for things like this. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)---

Re: [GENERAL] convert binary string to datum

2007-10-13 Thread Gregory Stark
ou probably don't want to name your type starting with an _. Postgres names array types starting with _ so that's likely to confuse something and if not something then at least someone. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end

Re: [GENERAL] Using case expressions in update set clause

2007-10-15 Thread Gregory Stark
t with set date_field = coalesce(date_field, some_date) -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] CHAR SETS

2007-10-15 Thread Gregory Stark
e concerned with cpu usage though. It also requires extra indexes if you want to be able to use an index for LIKE. And you can't do substring() or length() on a very large datum without fetching the whole datum. -- Gregory Stark EnterpriseDB http://www.enterprisedb.co

Re: [GENERAL] Order-independent multi-field uniqueness constraint?

2007-10-19 Thread Gregory Stark
) is OK > syntax but not UNIQUE(my_function(x)). Really? It doesn't work for me in the ADD CONSTRAINT syntax. I don't think you can use the ADD CONSTRAINT syntax, you have to use the CREATE UNIQUE INDEX syntax. It's effectively the same in Postgres anyways. -- Gr

Re: [GENERAL] Crosstab Problems

2007-10-19 Thread Gregory Stark
as an error if you're running thousands of queries per minute. The logs fill up and even if you filter the logs it imposes extra run-time overhead. You end up having to avoid the warning just as if it had been an error. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com -

Re: [GENERAL] keeping an index in memory

2007-10-21 Thread Gregory Stark
ou're selecting on being stored out of line ("toasted") which would hurt performance if you're often accessing many of those columns. If it's not true then you may have a lot of dead space in your table which would decrease performance. -- Gregory Stark

Re: [GENERAL] looking for some real world performance numbers

2007-10-22 Thread Gregory Stark
eir Adsense or other more normal use data structures in anything but a bog-standard SQL database. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] unicode searches failing that use % and LIKE operators

2007-10-22 Thread Gregory Stark
used in English such as Greek characters. Is this Windows or some form of Unix? Do you have a particular LIKE pattern and a particular example for which it fails? Or does it work reasonably when you test individual values but fail when you perform large searches? -- Gregory Stark Enterpris

Re: [GENERAL] unicode searches failing that use % and LIKE operators

2007-10-22 Thread Gregory Stark
e the problem > here, without success. Now I was using 8.1.10 on Linux (I gather your > platform is not Linux from the spelling of the locale names) Really? On my Debian system the locales are named precisely like that. What do they look like on Red Hat? -- Greg

Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-23 Thread Gregory Stark
d objects such as GUI elements. These are allocated in shared space so they can be manipulated by any process running in that "desktop". Why Shell32 and User32 are allocating space in there just to initialize themselves or handle these basic utility functions is a bit o

Re: [GENERAL] deadlock detected, only selects (not select-for-update)

2007-10-24 Thread Gregory Stark
will lock the referenced keys. If they lock the referenced keys in different orders then it's possible for them to deaadlock. This is addressed in more recent versions of PostgreSQL. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broad

Re: [GENERAL] 8.3b1 in production?

2007-10-24 Thread Gregory Stark
chr, as we do . Make "role is not permitted to log in" errors not be hidden . Remove quotes around locale names in some places for consistency. . Add missing entry for PG_WIN1250 encoding, per gripe from Pavel Stehule. Also enable translation of PG_WIN874 -- Gregory Stark Enter

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Gregory Stark
p of Postgres's current memory allocations and could be useful in showing if there's a memory leak causing this. Also, what version of Postgres is this? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)

Re: [GENERAL] [PGSQL v8.2.5] Similar queries behave differently

2007-10-25 Thread Gregory Stark
t of date stats and re-post both plans. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] [PGSQL v8.2.5] Similar queries behave differently

2007-10-25 Thread Gregory Stark
"Gregory Stark" <[EMAIL PROTECTED]> writes: > "Reg Me Please" <[EMAIL PROTECTED]> writes: > >>-> Seq Scan on tt_elem (cost=0.00..29.40 rows=1940 width=8) >> (actual time=0.012..0.0

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Gregory Stark
ind to tune other things properly. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] 8.3b1 in production?

2007-10-25 Thread Gregory Stark
s which play with the locale or a locale like hungarian which compares some different strings as equal then you might have to reindex. Otherwise it's just a Postgres server restart's worth of downtime. There are both data eating bug fixes and security fixes in 8.1.10 for yo

Re: [GENERAL] subversion support?

2007-10-25 Thread Gregory Stark
rather than the other way around. So you just need to track those sql files in your revision control system, and they're just plain text. The situation is complicated somewhat by the SQL "ALTER TABLE" and so on commands which you need to use instead of just reissuing the CR

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Gregory Stark
granularity. Perhaps one partition per day instead of one per 30s. you could drop a partition when all the keys in it are marked as dead. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Selecting tree data

2007-10-26 Thread Gregory Stark
? How do >> I need to structure the table, and what query do I have to run in >> order to make it happen? > > You need to look at the connectby function which is part of contrib. Or ltree. Depending on how static your data is and what else you need to do with it. -- Grego

Re: [GENERAL] select count() out of memory

2007-10-26 Thread Gregory Stark
"Sam Mason" <[EMAIL PROTECTED]> writes: > On Fri, Oct 26, 2007 at 08:25:09AM +0200, Thomas Finneid wrote: >> Gregory Stark wrote: >> >Tom's point is that if you have 55k tables then just *finding* the newest >> >child table is fairly expensive. You&

Re: [GENERAL] createdb argument question

2007-10-28 Thread Gregory Stark
, I > guess no one really cares about consistency or traditions. You can get the traditional behaviour out of glibc if you set POSIXLY_CORRECT. One thing to beware of is that patch behaves very strangely with POSIXLY_CORRECT set though. -- Gregory Stark EnterpriseDB

Re: [GENERAL] select random order by random

2007-11-01 Thread Gregory Stark
r by nextval('s'); nextval - 11 12 13 14 15 16 17 18 19 20 (10 rows) That's certainly not how I remembered it working but I'm not sure I ever tested it before. -- Gregory Stark EnterpriseDB http:/

Re: [GENERAL] select random order by random

2007-11-01 Thread Gregory Stark
this substitution kind of makes sense if you're thinking about things the way the spec does. It doesn't make much sense if you're thinking the way Postgres does of having arbitrary expressions there independent of what's in the select list. -- Gregory Stark Enterprise

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Gregory Stark
ec and > postgres takes 1 m10 sec . Is there anything that can be done in postgresql > for speeding this up? How large are the actual respective data files? What are the columns in these tables? Do you have many char() and NUMERIC columns? -- Gregory Stark EnterpriseDB http:

Re: [GENERAL] any way for ORDER BY x to imply NULLS FIRST in 8.3?

2007-11-07 Thread Gregory Stark
views and make explicitly constructed scans in the backend use NULLS LAST. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support! ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Optimal time series sampling.

2007-11-08 Thread Gregory Stark
ost > recent price for a given stock for each week (or month or quarter or year). Do you care what happens if there were no trades for a given stock in the time period? The query you give above using MAX would still work but the query I described using DISTINCT ON would not emit a record for t

Re: [GENERAL] Chunk Delete

2007-11-17 Thread Gregory Stark
e records is updated while the delete is running.) You should note this will delete 50,000 arbitrary records. Not necessarily the 50,000 oldest ones or anything useful. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication suppor

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-17 Thread Gregory Stark
ll want to modify your function to include an ORDER BY -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training! ---(end of broadcast)--- TIP 9: In versions belo

Re: [GENERAL] Primary Key

2007-11-17 Thread Gregory Stark
able day when it turns out the 24 fields aren't unique and you need to consider adding a 25th column to the table *and every table referencing it* as well as changing every line of application code to use the new column. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ge

Re: [GENERAL] Variable LIMIT and OFFSET in SELECTs

2007-11-17 Thread Gregory Stark
ecords it will magically find a record that says it should in fact have skipped 50 records. Of course then if the next record says it should only have skipped 1 record then what does that mean? The limit and offset values can be anything, even something "VOLATILE" like random() or a subquery, b

Re: [GENERAL] LIBPQ: Can we have buffered PGresult (i.e. a retreival bu chuncks?)

2007-11-22 Thread Gregory Stark
"Abraham, Danny" <[EMAIL PROTECTED]> writes: > Is there a way to break the PGresult array to chunks > Like Oracle? There isn't a protocol-level way but there is a way in SQL, use cursors and "FETCH FORWARD " -- Gregory Stark EnterpriseDB http:

Re: [GENERAL] Why LIMIT and OFFSET are commutative

2007-11-27 Thread Gregory Stark
a query like SELECT * FROM (SELECT * FROM (query) LIMIT n) OFFSET n or vice versa. Or alternatively do the arithmetic. If there's already an offset in the query structure when Skip() is called then add that amount to the offset. I'm assuming your methods are called on some kind of ob

Re: [GENERAL] Another question about partitioning

2007-11-27 Thread Gregory Stark
being able to add and drop entire partitions effectively instantaneously. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support! ---(end of broadcast)--- TIP 1: if posting/reading through U

Re: [GENERAL] Linux v.s. Mac OS-X Performance

2007-11-27 Thread Gregory Stark
eans... Mach... which is entirely > different than say FreeBSD at the kernel level. I think (but I'm not sure) that the kernel in OSX comes from BSD. What they took from NeXT was the GUI design and object oriented application framework stuff. Basically all the stuff that Unix programmers s

Re: [GENERAL] Streaming LIBPQ? Sliding Window in LIBPQ?

2007-11-28 Thread Gregory Stark
you're writing a driver implementing the protocol from scratch you could expose chunks of results to the application but there's no protocol-level support for it so you can't directly control the rate at which results arrive or the chunk size or anything like that. -- Gregory

Re: [GENERAL] notify/listen disappearing data

2007-11-29 Thread Gregory Stark
not it's only a matter of time before they do something bad to your data. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support! ---(end of broadcast)--- TIP 1: if pos

Re: [GENERAL] invalid byte sequence for encoding "UTF8"

2007-11-30 Thread Gregory Stark
encoding you'll be stuck. Postgres doesn't support using multiple encodings in the same database (or effectively even in the same initdb cluster). -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres sup

Re: [GENERAL] Recheck condition

2007-11-30 Thread Gregory Stark
;62' AND person_id IN ( SELECT person_id FROM person WHERE column1=1 AND column2='189' ) or SELECT person_id FROM person AS parent WHERE column1=1 AND column2='62' AND EXISTS ( SE

Re: [GENERAL] postgresql table inheritance

2007-11-30 Thread Gregory Stark
here to whatever that method returns there for some record somewhere... And it's awfully hard to index and join between complex expressions picking data out from inside objects on both sides, etc. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB&#

Re: [GENERAL] Recheck condition

2007-12-01 Thread Gregory Stark
nd of bitmap scan with a bitmap of ids. And once the bitmap is done scan an index on person for just the matching records. Postgres doesn't support anything like this (yet:). -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS

Re: [GENERAL] full_page_writes = off?

2007-12-01 Thread Gregory Stark
"rihad" <[EMAIL PROTECTED]> writes: > Hi, would full_page_writes=off increase the risk of inconsistency or db > corruption in 8.3 and FreeBSD 7? yes. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB&#

Re: [GENERAL] Will PG use composite index to enforce foreign keys?

2007-12-03 Thread Gregory Stark
a SELECT against the referencing column. It does > That is, in this > example, if the following effectively happens: > > SELECT * FROM B WHERE O = 1; Actually the query is (effectively, assuming your equality operators are named "=" and the columns match in type) SEL

Re: [GENERAL] limits

2007-12-04 Thread Gregory Stark
ecute 4 billion statements even if it's in a loop. 8.3 helps this by making most read-only operations not count. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! ---(end of broadcast)--

Re: [GENERAL] aggregate and order by

2007-12-06 Thread Gregory Stark
twice in the same query like "select avg_vel(position, pos_time), avg_vel(position2, pos_time2) from ..." -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support! ---(end of broadcast)-

Re: [GENERAL] Replication Monitoring

2007-12-06 Thread Gregory Stark
You're more likely to see responses if you post in a new thread. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training! ---(end of broadcast)-

Re: [GENERAL] Determining current block size?

2007-12-06 Thread Gregory Stark
ck_size ---- 8192 (1 row) -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [GENERAL] storage size of "bit" data type..

2007-12-06 Thread Gregory Stark
'0001' > select pg_column_size('a'::text), pg_column_size(1::numeric), > pg_column_size(3111234::numeric); > pg_column_size | pg_column_size | pg_column_size > ++ > 5 |

Re: [GENERAL] partitioned table query question

2007-12-11 Thread Gregory Stark
bute and in the where clause (either directly or the computation) or > b.) precomputing the bin and directly accessing the child table will be the > only options we have for now. Or the near future. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support! ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] top posting

2007-12-11 Thread Gregory Stark
only having said that then say *how* to quote it. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Hijack!

2007-12-11 Thread Gregory Stark
h those > provisions. Any unauthorized review, use, disclosure or distribution is > prohibited. If you are not the intended recipient, please contact the sender > by > reply e-mail and destroy all copies of the original message. FWIW this would be another item on the netiquette FAQ

Re: [GENERAL] top posting

2007-12-11 Thread Gregory Stark
ntences of your message? If you did would you have any trouble finding the original message to reread it? Top-posting makes perfect sense if you start from the broken place of assuming you need to copy the entire thread into every message. It's a bit like saying "but officer I had to spe

Re: [GENERAL] Hijack!

2007-12-11 Thread Gregory Stark
ople > with hammers over this minor infraction. It really makes one feel > unwelcome. I'm sorry, to what were you referring? To which Greg were you responding to? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres sup

Re: [GENERAL] Slow PITR restore

2007-12-12 Thread Gregory Stark
e worst case it has to do nearly as much work as the original database did. And it only gets to use 1 cpu so it can only have one i/o request pending. bgwriter is started already when doing recovery, right? Perhaps things could be helped by telling bgwriter to behave differently during recov

Re: [GENERAL] Hijack!

2007-12-12 Thread Gregory Stark
; (Larry Wall, Apocalypse 6) > > ---(end of broadcast)--- > TIP 3: Have you checked our extensive FAQ? > >http://www.postgresql.org/docs/faq I agree. -- Gregory Stark EnterpriseDB http://www.enterprise

Re: [GENERAL] WHERE (columnX IN (x,y,z)) ORDER BY columnY conflict

2007-12-12 Thread Gregory Stark
, what version of the server are you using? Have you updated to the latest bug-fix release for that version? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Slow PITR restore

2007-12-12 Thread Gregory Stark
I wouldn't be complaining. Depending on your transaction mix and what percentage of it is read-only select queries you might reasonably expect the restore to take as long as it took to generate them... -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about

Re: [GENERAL] Slow PITR restore

2007-12-12 Thread Gregory Stark
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > On Wed, 12 Dec 2007 18:02:39 +0000 > Gregory Stark <[EMAIL PROTECTED]> wrote: > >> I'm not sure what you guys' expectations are, but if you're restoring >> 5 minutes worth of database traffic

<    1   2   3   4   >