-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Description
Issue type:
[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[x] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem:
Repo - https://github.com/kirit0s/typeorm-bugs.
If entity has @CreateDateColumn, after insert users, many identical select invoked too (number of select equal to the number of users).
Example:
query: COMMIT
query: INSERT INTO `user`(`id`, `firstName`, `lastName`, `age`, `createdAt`) VALUES (DEFAULT, ?, ?, ?, DEFAULT), (DEFAULT, ?, ?, ?, DEFAULT), (DEFAULT, ?, ?, ?, DEFAULT), (DEFAULT, ?, ?, ?, DEFAULT), (DEFAULT, ?, ?, ?, DEFAULT) -- PARAMETERS: ["fn1","ln1",30,"fn2","ln2",31,"fn3","ln3",32,"fn4","ln4",33,"fn5","ln5",34]
query: SELECT `User`.`id` AS `User_id`, `User`.`createdAt` AS `User_createdAt` FROM `user` `User` WHERE
`User`.`id` = ? -- PARAMETERS: [41]
query: SELECT `User`.`id` AS `User_id`, `User`.`createdAt` AS `User_createdAt` FROM `user` `User` WHERE
`User`.`id` = ? -- PARAMETERS: [41]
query: SELECT `User`.`id` AS `User_id`, `User`.`createdAt` AS `User_createdAt` FROM `user` `User` WHERE
`User`.`id` = ? -- PARAMETERS: [41]
query: SELECT `User`.`id` AS `User_id`, `User`.`createdAt` AS `User_createdAt` FROM `user` `User` WHERE
`User`.`id` = ? -- PARAMETERS: [41]
query: SELECT `User`.`id` AS `User_id`, `User`.`createdAt` AS `User_createdAt` FROM `user` `User` WHERE
`User`.`id` = ? -- PARAMETERS: [41]So, when I save 5k items, I have 5k selects and it's so slow.
ly4she and dolsup
Metadata
Metadata
Assignees
Labels
No labels