Speeding up SELECT calls...

Results 1 to 4 of 4

Thread: Speeding up SELECT calls...

  1. #1
    Max W. Guest

    Default Speeding up SELECT calls...

    &nbsp;<BR>Hi there --<BR><BR>one of the features of a site I am designing is to display a list of shops pulled from a database. I am handcoding everything using SQL, and the db is a SQL Server one (does that make sense?).<BR><BR>Because the way the shops are displayed is based on a a few "fixed" statements, is there a ways of speeding up the display process when a list method is chosen? (through a stored procedure, or somehow pre-compiling the SQL staements)?<BR><BR>Specifially, for an alphabetical listing, I use a statment like:<BR><BR>SELECT * FROM SHOP_LIST ORDER BY SHOP_NAME<BR><BR>and for a list by Location (based on STATE)<BR><BR>SELECT * FROM SHOP_LIST ORDER BY SHOP_STATE<BR><BR>Any comments or help is appreciated!<BR><BR>Thanks,<BR><BR>Max W.<BR><BR>

  2. #2
    Eddie Campbell Guest

    Default RE: Speeding up SELECT calls...

    How many shops are you talking about? 10, 100, 1000 or more?<BR><BR>If it&#039;s not that many, and the data doesn&#039;t change frequently, you would see a big improvement in speed by loading them all into arrays and not hitting the database at all. The arrays could be built in the Global.Asa or even hard coded on the page if the shops data doesn&#039;t change much.

  3. #3
    Max G. Guest

    Default RE: Speeding up SELECT calls...

    *<BR>Thanks for the response...<BR><BR>No, the Shop data doesn&#039;t change much, but unfortunately I don&#039;t have access to the Global.asa. The site is hosted on a commericial host which hosts many other sites that have nothing to do with mine, so I can&#039;t play with the Global.asa.<BR><BR>Sooooo... is there any way of speeding up the db calls? (Stored procedures, someway of pre-compling?)<BR><BR>Thanks,<BR><BR>Max

  4. #4
    Linda Pyrc Guest

    Default RE: Speeding up SELECT calls...

    You can make sure that the table contains an index on both the Name and State fields (ie 2 separate indexes). SQL will choose the correct index based on your ORDER BY statement and then process the records through the index which will be in the correct sequence.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts