Best programming practices / clarification

I have a few questions regarding searchs and queries.

Throughout my solution I have work queues set up so when a department selects a button, a “Find and Search” is done (through serveral thousand records) displaying the records that meet certian critera.

So far everything works fine, As I apporach the the reporting module, I understand the need and power using SQL queries and displaying the results in HTML for complex reports involving serveral tables and calculations.

I also have serveral reports that are basically listings sorted and summarized. Which I could use the ‘find and search technique’ and display in report layout (Similar to Filemaker).

My question is this ; I was under the impression that when using the “find & Search” , Servoy is translating the requesting into a SQL statement (Query)

What might determine to need for direct SQL query, V.S. and “search & Find” method. say for a search on one table with a few thousand records.

I am trying to best understand how performance is effected, and when I can build a simple listing style report, over a more complex HTML formated report.

Thanks for any insight!

Hi,

Servoy uses SQL queries for EVERYTHING. Period. When you use this code:

(Assumes the your form is based on “customers” table)

controller.find()
cust_type = 'Vendor'
controller.search()

The SQL that Servoy is generating looks something like this:

SELECT customerID FROM customers WHERE cust_type='Vendor'

So whether you issue your own SQL Query or you use the standard “find” command - it’s still using SQL behind the scenes.

Hope this helps.

Understood regarding the select statements.

SO there is no performance issues relating to the translation performed at the logic level, opposed to a direct query on the backend.

I was not sure when standard list / summary reports start to suffer performace (speed) issues and SQL/HTML reporting would be a more appropriate design.

As with filemaker a complex report based on daisy chained calculations could take several minutes to run.

When should I use list / summary reports,

when should I use SQL /HTML style reports, is there a basic rule of thumb?

ebrandt:
When should I use list / summary reports,

when should I use SQL /HTML style reports, is there a basic rule of thumb?

If you have complex reports, with calculations and summaries, using SQL/HTML can give you a tremendous boost, especially if you have to scroll the report.