database.schema.objectname

Posts   
 
    
amrosalah
User
Posts: 12
Joined: 04-Apr-2008
# Posted on: 01-Oct-2008 23:58:52   

Hello Is there a way so that LLBL doesnt query like this

select * FROM database.dbo.table

and do this instead

select * FROM dbo.table directly

i think having the database name could be a problem in performance always , plus makes the size of the text sent from the application to the SQL server bigger also , imagine query with 5 tables and we always use the database name , now imagine 10000 queries per minute ,thats a great deal of text .

Any help is appreciated .

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 02-Oct-2008 06:22:42   

Hi Amr,

Quoting the Manual (ref...):

You can rename the same schema for different databases to different names. You can also specify an empty string. In that case, the schema name isn't generated into the SQL. For some situations this can be handy, though keep in mind that if you use empty strings for schemas on SqlServer, you also have to specify an empty string for the catalog name in a catalog name overwrite section.

An example:

<configSections>
       <section name="sqlServerSchemaNameOverwrites" type="System.Configuration.NameValueSectionHandler" />
       <section name="sqlServerCatalogNameOverwrites" type="System.Configuration.NameValueSectionHandler" />
</configSections>

<appSettings>
       <add key="Main.ConnectionString" value="data source=.;initial catalog=Northwind;integrated security=SSPI;persist security info=False;packet size=4096"/> 
</appSettings>

<sqlServerSchemaNameOverwrites>
       <add key="dbo" value="" />
</sqlServerSchemaNameOverwrites>

<sqlServerCatalogNameOverwrites>
       <add key="Northwind" value="" />
</sqlServerCatalogNameOverwrites>
David Elizondo | LLBLGen Support Team