View Single Post
Old 12-23-2005, 06:33 AM   #4 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 676
DJMaze is on a distinguished road
You could create an index that uses both tables.
Something like
Code:
CREATE INDEX trip_data ON (trip, data) USING btree (trip.id, data.id);
Code:
SELECT * FROM (trip, data) WHERE trip.id = data.id;
I'm not 100% if this code is correct cos i don't use table binding often.
There's a better one which also supports a great DELETE feature so if you delete a trip.id it also deletes all data entries that have the same id
DJMaze is offline   Reply With Quote