John A DAVIS wrote:
left join where item in right table is null
That's still going to look at all records in both tables:
1) so it can work out if there is a match from table 1 to table 2
2) so it can then remember to display any records that don't have a match
I was thinking more that if you
left join where item in right table is null
>>> "Chris" <[EMAIL PROTECTED]> 10/3/2007 10:32:01 PM >>>
Aleksandar Vojnovic wrote:> I would also suggest to limit yourself to things you actually need not > to select the whole table.In this case you can't because you're looking for records that e
On Thu, 2007-10-04 at 11:56 +1000, Chris wrote:
> Robert Cummings wrote:
> > On Thu, 2007-10-04 at 11:23 +1000, Chris wrote:
> >> Robert Cummings wrote:
> >>> On Wed, 2007-10-03 at 14:49 -0700, Jim Lucas wrote:
> This is only from my own personal testing. Mind you that I have only
> bee
Aleksandar Vojnovic wrote:
It seems you missed my point :) if you would need all the data then
select them all, but if you need only partial data from the table then
you could limit yourself to that specific columns. I doubt everybody
need everything all the time. True?
Ahh - you meant the se
It seems you missed my point :) if you would need all the data then
select them all, but if you need only partial data from the table then
you could limit yourself to that specific columns. I doubt everybody
need everything all the time. True?
Aleksandar
Chris wrote:
Aleksandar Vojnovic wrot
Aleksandar Vojnovic wrote:
I would also suggest to limit yourself to things you actually need not
to select the whole table.
In this case you can't because you're looking for records that exist in
one table that don't exist in another.
Apart from looking at the whole table in each case how e
I would also suggest to limit yourself to things you actually need not
to select the whole table.
Aleksandar
Jim Lucas wrote:
Colin Guthrie wrote:
Martin Marques wrote:
SELECT * FROM company WHERE id NOT IN (SELECT companyID FROM contacts);
Not ideal as has been mentioned else where in thi
Robert Cummings wrote:
On Wed, 2007-10-03 at 14:49 -0700, Jim Lucas wrote:
This is only from my own personal testing. Mind you that I have only been using PostgreSQL for a
year or so. But one problem that I have always ran into with MySQL is that when JOIN'ing tables
that have large data sets
Robert Cummings wrote:
On Thu, 2007-10-04 at 11:23 +1000, Chris wrote:
Robert Cummings wrote:
On Wed, 2007-10-03 at 14:49 -0700, Jim Lucas wrote:
This is only from my own personal testing. Mind you that I have only been using PostgreSQL for a
year or so. But one problem that I have always ra
On Thu, 2007-10-04 at 11:23 +1000, Chris wrote:
> Robert Cummings wrote:
> > On Wed, 2007-10-03 at 14:49 -0700, Jim Lucas wrote:
> >> This is only from my own personal testing. Mind you that I have only been
> >> using PostgreSQL for a
> >> year or so. But one problem that I have always ran int
Robert Cummings wrote:
On Wed, 2007-10-03 at 14:49 -0700, Jim Lucas wrote:
This is only from my own personal testing. Mind you that I have only been using PostgreSQL for a
year or so. But one problem that I have always ran into with MySQL is that when JOIN'ing tables
that have large data sets
On Wed, 3 Oct 2007, Robert Cummings wrote:
> I'd use the left join whenever available.
Similarly, I design for the left join whenever possible.
--
Greg Donald
Cyberfusion Consulting
http://cyberfusionconsulting.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
On Wed, 2007-10-03 at 14:49 -0700, Jim Lucas wrote:
>
> This is only from my own personal testing. Mind you that I have only been
> using PostgreSQL for a
> year or so. But one problem that I have always ran into with MySQL is that
> when JOIN'ing tables
> that have large data sets is a PITA.
Colin Guthrie wrote:
Martin Marques wrote:
SELECT * FROM company WHERE id NOT IN (SELECT companyID FROM contacts);
Not ideal as has been mentioned else where in this thread.
Col
I think one would have to take into account the DB type being used here.
I can have MySQL and PostgreSQL setup a
Martin Marques wrote:
> SELECT * FROM company WHERE id NOT IN (SELECT companyID FROM contacts);
Not ideal as has been mentioned else where in this thread.
Col
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I agree with this. Never use a subquery when a join will work. The
optimizer with thank you with performance.
James Ausmus wrote:
On 10/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi J,
Checkout this,
SELECT * FROM tbl_company where id not in (SELECT companyID from
tbl_contacts)
On 10/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hi J,
> >
> >
> > Checkout this,
> >
> >
> > SELECT * FROM tbl_company where id not in (SELECT companyID from
> > tbl_contacts)
> >
>
>
> Brilliant! This is exactly what I was looking for, and is quite
> logical/readable! Thanks to every
> Hi J,
>
>
> Checkout this,
>
>
> SELECT * FROM tbl_company where id not in (SELECT companyID from
> tbl_contacts)
>
Brilliant! This is exactly what I was looking for, and is quite
logical/readable! Thanks to everyone for the ideas!
J
>
>
>
>
> Regards,
> Lasitha Alawa
18 matches
Mail list logo