If you're using a table in YugabyteDB, the system automatically assigns a key to it, whether user-defined or not. When querying this table, specifying the primary key can significantly improve performance by avoiding a sequential scan of all rows. On the other hand, if the primary key is not specified, YugabyteDB will perform a full scan, which can incur heavy latencies and slow down query execution. To optimize query performance, it's recommended to create a primary key for user-defined tables and consider creating indexes on additional columns or using the INCLUDE *keyword* when necessary.