forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Handling Of Update Sql: Untouched Columns Are Updated As Well
- This topic is empty.
-
AuthorPosts
-
-
June 7, 2007 at 1:52 pm #10372ekodMember
Suppose I have:
Code:CREATE TABLE `test` (
`ID` bigint(20) unsigned NOT NULL auto_increment,
`post_title` blob,
`post_status` enum('publish','draft')
PRIMARY KEY (`ID`),
)and i change the status in some row, sqlyog does this:
update `test` set `ID`='1',`post_title`='Lorem ipsum dolor sit amet, t, sapien. Suspendisse potenti. Nunc ipsum enim, lobortis vel, pulvinar eget, tempus ac, quam. Morbi auctor. Phasellus diam. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec in neque. Nam ultrices arcu nec odio. Cras faucibus, eros sit amet blandit commodo, libero quam rutrum dolor, a laoreet orci leo a nunc. Mauris sapien. Phasellus tristique.rnrnMorbi bibendum metus id diam. Nunc egestas ornare sapien. Sed pede nisi, euismod ac, suscipit l 😮 ANOTHER 700KB OF TEXT 😮 neque. Vestibulum ipsum nisi, rutrum varius, dignissim non, congue quis, magna. Phasellus tortor odio, congue ac, porta tristique, aliquet eget, sapien. Suspendisse potenti. Nunc ipsum enim, lobortis vel, pulus. Duis risus nulla, dignissim vel, lacinia eget, sagittis sit amet, mi. Curabitur in tellus. In lorem. Quisque orci nibh, pellentesque a, rutrum ut, varius tempor, orci. Fusce a tellus. Fusce sapien nunc, tincidunt sed,as sem ac dolor. Donec dignissim, quam sagittis rhoncus ornare, massa augue sagittis urna, nec ullamcorper eros sapien sit amet eros. Praesent sed sapien. Fusce in tellus at est faucibus lacinia. Aliquam mattis, sem non scelerisque venenatis, orci erat sodales nunc, in aliquam orci quam et risus. Sed tincidunt gravida ligula. Praesent luctus. Duis dictum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; ',`post_status`='draft' where `ID`='1'
instead of:
update `test` set `post_status`='draft' where `ID`='1'
Why is this unnecessary transport of data? I guess you can just detect of some column has changed at all isnt it?
-
June 7, 2007 at 2:29 pm #24213peterlaursenParticipant
I think every GRID based GUI does like this. Â The only exception is TIMESTAMP fields defined as 'ON UPDATE CURRENT_TIMESTAMP' because the server should update those with now()!
How should we check otherwise than comparing with data on the server? Â That would demand the same or maybe more data to be transferred.
You can work from the RESULT tab and not the DATA tab and only the displayed columns will be updated.
-
June 7, 2007 at 2:33 pm #24214ekodMemberpeterlaursen wrote on Jun 7 2007, 02:29 PM:I think every GRID based GUI does like this. The only exception is TIMESTAMP fields defined as 'ON UPDATE CURRENT_TIMESTAMP' because the server should update those with now()!
How should we check otherwise than comparing with data on the server? That would demand the same or maybe more data to be transferred.
You can work from the RESULT tab and not the DATA tab and only the displayed columns will be updated.
Fast response 🙂
Ok, agree about result tab, but since you dont check anyway with the server data when sending the update, you might check if a column has changed on the client side only, true?
Plz correct me if i'm wrong..
-
June 7, 2007 at 3:50 pm #24215peterlaursenParticipant
yes .. it would be possible to set some kind of flag for every cell in the grid that tells if it had been touched or not! Â But we do not do it and there are no such actual plans!
-
-
AuthorPosts
- You must be logged in to reply to this topic.