How can I make table legs from planks to support a heavy table top?
I think you really should plan to build your table that is 9 feet long with a full four sided apron that is just under the inside edge of the table top and attached to the top. For a table that size consider an apron that is 6 inches wide and attached to the bottom of the table.

The apron is cut short in the corners so that a square profile leg can be bolted to the apron corner as attached through diagonal brackets in each frame corner. Built properly this can provide an extremely secure fastening for the leg to the table and yet still be removable for moving and/or storing the table.

These pictures can give you an idea of how this looks from a couple of vantage points: