Subject | Re: Help needed optimizing query |
---|---|
Author | emb_blaster |
Post date | 2010-02-08T16:22:51Z |
> I've two tables, the "hierarchy table" POSITION_SCREEN_MAP, and then theI saw that but was a litle confused by your uses of it. But seems Sven just show what should be mine sugestion of use. Put the tree in first FROM clause and then join it on it'self and join TEXT_DATA last.
> actual data, "TEXT_DATA". So basically I've a lot of text blobs I need to
> organize in the tree structure. POSITION_TAG is the name of the node in
> tree, and it is used to associate one text blob to certain node in the
> tree.
>
I always choose to put the table with less count of rows in first from. This, AFAIK, help the Firebird optimizer. I mean it has fewer number of keys to look before to make the joins.
You should see that TEXT_DATA Natural is not show anymore in Plan.