Hello, do you have a way to define that each of these logging queries belong to the same "packet". We can setup a flag field which will hold boolean value indicating that the row is "closed". The row will remain open untill the third packet arrives, after which it will be closed. When data comes, if any row is open, it will be added to that row rather than inserted to a new row. This can be done by means of php and minor modification of your db (adding a field).
Can do this for you. If interested, feel free to contact me. Regards, Alexander