Craig van Tonder
Craig van Tonder

Reputation: 7687

MySQL - Can using reserved words as table names decrease performance?

I know that doing something like this would be considered bad practice but if one were to create a table with fields like from, to, desc and did:

SELECT *

or

SELECT `from`, `to`, `desc`

With a massive data / result set would this have any kind of performance difference as opposed to using names like sent_from, sent_to, description?

Upvotes: 0

Views: 122

Answers (2)

Mathew
Mathew

Reputation: 296

Using keywords like 'from','to' would not bring down the performance, rather there would be instances of others confused while there is a need to update data.Some tools that has auto-complete features would consider it as a keyword rather than a field.It would be better to use the 'table_name.from' rather using 'from'.

Upvotes: 0

Rahul Tripathi
Rahul Tripathi

Reputation: 172448

I don't think there will be any or rather any significant difference in the performance if you are using reserved keywords as table name. The only thing which you will get and which you are already aware of, is the readability and the poor design of database.

Upvotes: 2

Related Questions