Other OutSystems sites...
OutSystems Website
About Agility Blog
OutSystems Network
Login
Signup
Forums
Academy
Forge
Ideas
Forums
›
Technology & Integration
›
Platform DB & Entities
Platform DB & Entities
enigma
Rank: #89
Posted on 2012-07-14
thumbs_up_ico
0
thumbs_down_ico
0
reply
post_link_ico
ive just been having a look at the outsystems databse catalog
and found that, if i create a entity attribute and then delete/rename it,
it remains in the actual DB, eventhough its not visible in service studio
and for every attribute that was ever created or renamed,
a record is created in a further table, even if it was deleted in the meantime
is this a normal behaviour?
and why isnt it all cleaned up a little?
afterall this will affect performance
João Rosado
Rank: #35
Posted on 2012-07-14
thumbs_up_ico
0
thumbs_down_ico
0
reply
post_link_ico
Hi enigma,
That is the normal behavior. We never delete data, so it is possible to rollback the operation by publishing a previous version of the eSpace.
But you will get a warning message saying the column exist, and after doing necessary data upgrades (if needed) you should delete it directly on the database.
Regards,
João Rosado
Justin James
Rank: #23
Posted on 2012-07-15
thumbs_up_ico
0
thumbs_down_ico
0
reply
post_link_ico
It really doesn't affect performance, only the needed columns get retreived. There are a lot of database "performance ideas" out there which were either never true, or used to be true but no longer aren't... this is one of them. Another is binary data in the DB. It used to be a problem. It isn't anymore.
J.Ja
enigma
Rank: #89
Posted on 2012-07-15
thumbs_up_ico
0
thumbs_down_ico
0
reply
post_link_ico
not even if the development server has been running for a few years?
i mean there must be a noticeable difference, between selecting from 1million or just 50 records
and if a new record is created, for every time a field/column is renamed, the 1million can be reached quite fast
the rollback possibility seems plausible
although the older a version gets, the lower the interest/need for a rollback will get
ie. you dont keep the daily backups for ten years ago either
im getting one of those warning/info messages
but if i try delete the column in the DB, i get an error because a index egsists
when i delete the index and then the column, i cant publish the espace anymore
because it tries accessing the deleted index
João Rosado
Rank: #35
Posted on 2012-07-15
thumbs_up_ico
0
thumbs_down_ico
0
reply
post_link_ico
Hi,
There shouldn't be any indexes over old attributes. So I'm guessing it was a default value contraint. Are you sure you deleted the correct column/index/contraint?
Even if you had deleted a needed index, the platform would just recreate it. What error are you getting?
Regards,
João Rosado
enigma
Rank: #89
Posted on 2012-07-15
thumbs_up_ico
0
thumbs_down_ico
0
reply
post_link_ico
pretty sure yes, when i try deleting the field in the DB i get:
"the index LOCALEID is dependent of column LOCALEID. ALTER TABLE DROP COLUMN LOCALEID failed because one or more objects access this column."
then i delete the index, which workes without errors
after that i try deleting the field again, which works now
but if i try publishing the espace again (without the deleted field in the entity) i get:
Publishing Error
Unable to upgrade database schema. Error trying to create index on database table 'OSUSR_9x6_UoM1' over fields '"LOCALEID"'.
Exception: Column name 'LOCALEID' does not exist in the target table or view.
if i now try creating the field in the entity and publish again, it works
but if i now delete the field from the entity again, the initial warning/info message appears again =)
Justin James
Rank: #23
Posted on 2012-07-15
thumbs_up_ico
0
thumbs_down_ico
0
reply
post_link_ico
Enigma -
Yes, you would be right that adding additional *rows* would cause a performance slowdown. But the system isn't adding additional *rows*, it is adding additional *tables* and additional *collumns*, neither of which cause a slowdown.
If this is a development server and it truly concerns you, delete the eSpace then redeploy it, and it gets a fresh set of tables with no data in them.
J.Ja
Quick Reply
Notify me by email when someone answers to my post
attachment
Choose File
No file chosen
Submit
Login to reply
Something on your mind?
Login to Start a Discussion
Top Forums Posters
Gonçalo Martins
Davide Marquês
Ricardo Silva
Statler & Waldorf
Richard Pearson
Fábio Silva
Justin James
Robert Chanphakeo
Kilian Hekhuis
Miguel Grilo
See leaderboard
Online Training
On-demand video lessons to help you learn at your own pace.
Learn More