Best unofficial Apache Server developers community |
|
Hi I have a problem between a database in PostgreSQL and SQLite. I need to work (single user) I had to create the database in SQLite, and luckily I managed to recreate the entire structure of the original DB into Postgresql. But now I have a problem. At some point in the Postgresql DB queries within the function with. Is there a way to do the same thing in Sqlite? Or how can I get the same result in Sqlite? What should I do? Hello and Thank you Luca
posted via StackOverflow
|
![]()  
|
As you allready discovered sqlite has no functions. So you will probably have to move some logic from the function and the single query out of your db into your app. This will probably mean executing a query looking at the result and based on that executing some more queries. So you can do the logic of the function in your app. While this is not recommended in PostgreSQL as performance suffers from many small queries the performance loss in SQlite is much smaller as it is an embedded database (no communication overhead) and it's planner is more straight forward which makes the planning overhead of seperate queries smaller. |