Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8323129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:37:24+00:00 2026-06-08T23:37:24+00:00

I have a function and pass it an integer e.g. 99, 4 or 3

  • 0

I have a function and pass it an integer e.g. 99, 4 or 3

The function returns a different integer (so effectively it transforms it)

Now I have found that this function is called in a select so for a 300 row import with all my related tables the total times the number transform function is called is 250k times!

This scares me a lot – My question is would this be better in a look up table that is joined to my query – thus removing the function from the select.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:37:26+00:00Added an answer on June 8, 2026 at 11:37 pm

    I would vote for look up table, as it can make use of the index of the table, if created
    Also the function need not to be run for each row when running against a table

    But one problem with look up table is that it should handle all possible inputs.
    We can handle only limited cases with look up table.

    So if you can create a look up table for all possible input, look up table has performance advantage over function

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a function that i want to pass as a parameter function myFun(){
I have a function that I want to pass an argument, market, to the
i have this function pymssql.connect(host=my host,user=my user,password=my pass,database=mydb) I want to read the user
I have a function like this void doSmth(Long... paramg){ } But I can't pass
I have a sql function that does a simple sql select statement: CREATE OR
I have class Foo(): function bar(): pass function foobar(): pass Rather than executing each
I have some function where I need to pass a point datatype . somefunc(United
I have a function function callback(obj){...} Is it okay to pass in more objects
If I have a function in SSJS and I want to pass one firm
I have an overloaded function which I want to pass along wrapped in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.