Order of fields in table defination, does it matter?
Options
![pete letkeman](https://us.v-cdn.net/6037124/user_avatars/5524134.jpg)
pete letkeman
Member ✭
In MySQL the order of the fields in the table defination matter, to a degree, performance wise.
For instance for quicker results you want to have your primary and foreign keys defined first and if they can be integer even better. Then you want:
1. booleans
2. enums
3. tinyint
4. int
5. long
6. date/time
7. character
8. varchar
9. blob
The reasoning is that keys are read first and almost always have values.
Next we go by amount of memory the data type utilizes and the fields which are more likely to have a value then those that don't.
I think that Xano uses Postgres under the hood and the table editor does allow you to change the ordering of the fields.
Does the ordering of the fields make any performance changes in Xano/Postgres?
For instance for quicker results you want to have your primary and foreign keys defined first and if they can be integer even better. Then you want:
1. booleans
2. enums
3. tinyint
4. int
5. long
6. date/time
7. character
8. varchar
9. blob
The reasoning is that keys are read first and almost always have values.
Next we go by amount of memory the data type utilizes and the fields which are more likely to have a value then those that don't.
I think that Xano uses Postgres under the hood and the table editor does allow you to change the ordering of the fields.
Does the ordering of the fields make any performance changes in Xano/Postgres?
Comments
-
Hey the order of your fields should not matter in Xano
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback