[V4REV] problem with binded variables - Revolution

David Simpson dsimpson at dotcomsolutionsinc.net
Wed Nov 12 12:19:10 CST 2008


Kirill/Ruslan,

Yes, you are exactly correct in terms of how the bind variables  
should be implemented.

But my problem is that Revolution doesn't respect empty values within  
arrays as NULL values. I am sure that this functionality will improve  
in the future, and then I will change my code accordingly.

In fact, what I am doing here is even worse from a performance  
perspective than what may be evident from this short piece of code.

I actually have to rewrite the INSERT SQL query for every single  
record I insert into the database - which is not good for performance  
either because the SQL database has to re-parse the SQL code for  
every ROW inserted. So if I am inserting 10,000 records, then that  
means that I rewrite the INSERT SQL statement 10,000 times, and it  
gets parsed by the database 10,000 times too.

But at the present time, the only way I can get the revDB functions  
to send a NULL to the database, is by putting the "NULL" placeholder  
into the statement.  I consider it to be important for my program to  
respect the writing of NULL values when doing data transfers.

It is interesting that I have not been noticing this to be a  
performance problem when I run my code. I have not run specific  
benchmark tests, but just using the software I have noticed that the  
performance has been comparable with Perl scripts performing the same  
task. But the Perl scripts don't require rewriting the query on each  
instruction. I think that this is a credit to Revolution in terms of  
the overall performance of Revolution compiled apps.

David Simpson
www.fmpromigrator.com





More information about the Valentina mailing list