[PERFORM] Two queries are better than one?

2005-07-28 Thread Karim Nassar
I ran into a situation today maintaining someone else's code where the sum time running 2 queries seems to be faster than 1. The original code was split into two queries. I thought about joining them, but considering the intelligence of my predecessor, I wanted to test it. The question is, which

Re: [PERFORM] Two queries are better than one?

2005-07-28 Thread John A Meinel
Karim Nassar wrote: I ran into a situation today maintaining someone else's code where the sum time running 2 queries seems to be faster than 1. The original code was split into two queries. I thought about joining them, but considering the intelligence of my predecessor, I wanted to test it.

Re: [PERFORM] Two queries are better than one?

2005-07-28 Thread Michael Fuhr
On Thu, Jul 28, 2005 at 04:04:25PM -0700, Karim Nassar wrote: I ran into a situation today maintaining someone else's code where the sum time running 2 queries seems to be faster than 1. The original code was split into two queries. I thought about joining them, but considering the

Re: [PERFORM] Two queries are better than one?

2005-07-28 Thread Gnanavel S
On 7/29/05, Karim Nassar [EMAIL PROTECTED] wrote: I ran into a situation today maintaining someone else's code where thesum time running 2 queries seems to be faster than 1. The original codewas split into two queries. I thought about joining them, butconsidering the intelligence of my

Re: [PERFORM] Two queries are better than one?

2005-07-28 Thread Karim Nassar
On Fri, 2005-07-29 at 09:41 +0530, Gnanavel S wrote: Joined: test= explain analyze test-SELECT cli_name,order.* test- FROM order test- JOIN client ON (ord_client = cli_code) test-

Re: [PERFORM] Two queries are better than one?

2005-07-28 Thread Gnanavel S
On 7/29/05, Karim Nassar [EMAIL PROTECTED] wrote: On Fri, 2005-07-29 at 09:41 +0530, Gnanavel S wrote: Joined: test= explain analyze test-SELECT cli_name,order.* test- FROM order test- JOIN client ON (ord_client = cli_code) test-WHERE ord_batch='343B' AND ord_id='12-645'; where is the cli_code