[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Mysql database and OO_base.org: problem with INNER JOINTS on tables



Hi to Everyone,

I am trying to manage a local MySQL database which is connected to OpenOffice.org_base using JDBC. The main table has about 90 fields and 25,000 elements. This table comprises a dozen of fields about 'places' (birthplace, weddingplace, deathplace, burialplace, workplace... ), which fields are not filled in plain text, but in postal codes. I have another table that displays placenames vs postal codes.

I did not have much problem figuring how to get an OO_base request to display the main table with placenames in clear, AS LONG AS IT WAS MATTER OF DISPLAYING ONLY ONE place field in clear, together with all other fields (fields others than 'place' fields as well as coded placefields).

Problems started as soon as I tried displaying two place-fields in clear. To do this, I created two JOINTURES between fields in two tables (was only one jointure when the matter was to display only one place field).

While the request succeeded after about one minute in the first case, it never ended in the second test ; I had to get out after half an hour using

#kilall -KILL mysqld

I then tried with a much shorter table, that is, the same table with only 1000 elements, the remaining 24,000 having been erased. Then, it did work... after about 10 minutes, which is a lot of time for such a small table... Yet I did not get exactly what was expected : only the lines where both placefields were NOT NULL did display. Whatever line with only one NOT NULL placefield, did not appear at all, while I expected that they all show up, with an empty column where the placefield was empty !

It is therefore clear that I did not use the right process !

Thanks in advance for your help


Reply to: