Re: [SQL] Nested loops are killing throughput

2006-09-20 Thread CG
>Is that the one off gborg? It's broken because the equality function is >marked volatile, and so the planner is afraid to try to use it for >merging or hashing. (It's also not marked strict, which means you can >trivially crash the backend by passing it a null ...) Tom, you are a genius. I chan

Re: [SQL] Nested loops are killing throughput

2006-09-19 Thread CG
for differing levels of paranoia, or the status quo. CG ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Nested loops are killing throughput

2006-09-19 Thread CG
>If packet_status is large, that seems like a perfectly reasonable plan >to me. If not ... what data type is packet_uuid? Is its equality op >marked mergeable or hashable? It is of type uniqueidentifier ... CREATE OPERATOR =( PROCEDURE = uniqueidentifier_eq, LEFTARG = uniqueidentifier,

Re: [SQL] Nested loops are killing throughput

2006-09-19 Thread CG
- Original Message From: Tom Lane <[EMAIL PROTECTED]> To: CG <[EMAIL PROTECTED]> Cc: pgsql-sql@postgresql.org Sent: Tuesday, September 19, 2006 11:03:07 AM Subject: Re: [SQL] Nested loops are killing throughput CG <[EMAIL PROTECTED]> writes: > -

[SQL] Nested loops are killing throughput

2006-09-19 Thread CG
Postgresql 8.1 I've tried turning off nested loops to see what the query planner would choose instead of nested loops. It chose a hash join, and it still had a nested loop in the mix! How can I entice the query planner to use a simpler join scheme? What criteria is used to determine whether or

Re: [SQL] empty set

2006-06-09 Thread CG
"select 1 where false" does indeed indicate an empty set. I was hoping for something more elegant, but I'll take what I can get. :) --- Bruno Wolff III <[EMAIL PROTECTED]> wrote: > On Thu, Jun 08, 2006 at 14:40:12 -0700, > CG <[EMAIL PROTECTED]> wrote: >

[SQL] empty set

2006-06-08 Thread CG
PostgreSQL 8.1 I've been trying to write a SQL prepare routine. One of the challenging elements I'm running into is an empty set ... "select foo from bar where foo in ? ;" What if "?" is an set with zero elements? What is the proper value to use to replace &q

Re: [SQL] Clustering problem

2005-07-11 Thread CG
Why would you then drop the index? Performance and storage issues? I imagine that I would cluster the table at regular intervals to maintain the ordering, so I'd need to to keep the index around, yes? --- PFC <[EMAIL PROTECTED]> wrote: > > > > Is it even possible to cluster a table based on th

[SQL] Clustering problem

2005-07-08 Thread CG
Can you gurus think of a better strategy? :) (Please??) :) CG Sell on Yahoo! Auctions – no fees. Bid on great items. http://auctions.yahoo.com/ ---(end of broadcast)--- TIP

[SQL] DROP IF ...

2005-05-24 Thread CG
tion 286000108 is still open CONTEXT: PL/pgSQL function "dropif" line 6 at execute statement ... It makes sense. The select is still open when the table is going to be dropped. I need a different strategy. Please advise! CG __