[firebird-support] Re: singleton table with many fields

2013-07-15 Thread thp_pkmi
Thank you Alexandre for your reply. Furthermore, is it any difference accessing 
that singleton table by: 
SELECT .. INTO .. FROM SINGLETON_TABLE
or
SELECT .. INTO .. FROM SINGLETON_TABLE ROWS 1

Regards,
Tjioe


--- In firebird-support@yahoogroups.com, Alexandre Benson Smith iblist@... 
wrote:

 Em 16/7/2013 00:03, thp_pkmi escreveu:
  Hi all,
 
  I have a table that always contains 1 record and have about 50 fields with 
  various type. It's function is to store system parameters and is accessed 
  very frequent from application and also from database triggers and stored 
  procedures. Is it wise to utilize a singleton table like this, or is it 
  better to implement a table with many records storing parameter name, type, 
  and values ?
 
  Thank you very much.
 
  Regards,
  Tjioe
 
 
 
 I doubt it will make any diference...
 
 I think you will have a dozen or so records.. that will fit in a single 
 page...
 
 Since every operation will read/write a page...
 
 see you !





Re: [firebird-support] Re: singleton table with many fields

2013-07-15 Thread Alexandre Benson Smith
Em 16/7/2013 01:37, thp_pkmi escreveu:
 Thank you Alexandre for your reply. Furthermore, is it any difference 
 accessing that singleton table by:
 SELECT .. INTO .. FROM SINGLETON_TABLE
 or
 SELECT .. INTO .. FROM SINGLETON_TABLE ROWS 1

 Regards,
 Tjioe



There is no way a query in a table with a single row to be slow :)

Put it in a loop for 1000 times and look for the diference...

see you !