Re: many to many relationships - effective database development for performance (my solution)
Posted by: Sukhwinder Singh
Date: April 15, 2008 01:35PM

Hello,

I had read that page (searched almost everywhere). I was back to forum to find solution to another problme and found this question and thought I should post how I went about solving this problem.

I used the help of temporary tables.


I Joined product table with all other relevent tables one by one and got the product_id where the keywords matched in other tables' fields, and stored product_id into a temporary table as my end result was going to show the product listings.

Then I had many duplicated entries for product_id in temporary table because of keywords matching in many tables related to product table. I stored the distinct product_id result in another temporary table and finally joined the product table with the values in the temporary table having distinct prodcut_ids.

It is pretty fast for the number of records.



Edited 1 time(s). Last edit at 05/15/2008 04:48AM by Sukhwinder Singh.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.