MySQL Forums
Forum List  »  Newbie

Re: Error Code: 1118 Row Size too large
Posted by: Phillip Ward
Date: May 03, 2023 02:33AM

Let me start with a bold statement:

Database != Spreadsheet

Do not think of your database as a spreadsheet with rows and columns that you can do just anything with. All the rows of a table share the same structure and that structure is what gives Databases their power.

One of the first Rules of Data Normalisation is to take any "repeating" data fields in your record (AI001, AI002, etc.) and split them out into a separate table.
Trying to write any sort of query that needs to look "across" 300 fields is going to be a complete nightmare to work with.
... where ai001 in ( 'fred', 'barnie' ) 
       or ai002 in ( 'fred', 'barnie' ) 
. . . 
       or ai300 in ( 'fred', 'barnie' )

Also, any table that doesn't have a unique, Primary Key, is going to be equally difficult to work with.

So, your table could look more like this:

create table ai_locations
( id int not null auto_increment 
, ai_timestamp datetime not null 
, location varchar( 25 ) not null

Regards, Phill W.

Options: ReplyQuote

Written By
Re: Error Code: 1118 Row Size too large
May 03, 2023 02:33AM

Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.