‎2007 Mar 09 10:16 AM
according to performance tuning waht should i use ?
SELECT SINGLE or SELECT UPTO ONE ROW?
‎2007 Mar 09 10:19 AM
If you can satisfy the pimary key then select single else select upto one row
thanks
‎2007 Mar 09 10:17 AM
select single if you have the full key to be passed to the where condition.
‎2007 Mar 09 10:19 AM
If you can satisfy the pimary key then select single else select upto one row
thanks
‎2007 Mar 09 10:19 AM
hi
select single performs better if u have full keys used in the where condition.
otherwise...go for slect upto 1 row.
regards,
madhu
‎2007 Mar 09 10:19 AM
i think select single because it is hitting the database only one time but select...upto one rows hitting the database multiple times for satisfying where clause. Generally if you can specify full key in your where clause use select single.
regards'
shiba dutta
‎2007 Mar 09 10:20 AM
select single : returns the first matching row for the given condition and it may not be unique, if there are more matching rows for the given condition.
select up to 1 rows : retrieves all the matching records and applies aggregation and ordering and returns the first record.
In order to check for the existence of a record then it is better to use <b>select single</b> than using <b>select up to 1 rows</b> since it uses low memory and has better performance.
‎2007 Mar 09 10:21 AM
‎2007 Mar 09 10:25 AM
Hi,
select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
Regards,
Sruthi