Jump to content

Categorisation Performance Select vs Language

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
dvelpo

dvelpo

    Newbie

  • Members
  • Pip
  • 6 posts
Hey guys,

if i have 30.000 data sets in a database and i have to go through them and categorize them.

Is it better to categorize them already in the selecte statement with many WHERE parameters

OR

is it better to say select * (maybe with 1-2 where parameters) and then categorize them with switch or something like that.

The question is what is faster?


thx for any answers

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
What language are you using and what database are you using? If you said..

PHP and MySQL I would say PHP is faster.

If you said

C++/PHP/C/etc. and Oracle I would say Oracle is faster.

#3
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
It will also depend on how you are categorizing them. I had a very simple insert statement with subselects that ended up being far slower than a select * and manual inserts. It will all depend on what you're doing.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#4
dvelpo

dvelpo

    Newbie

  • Members
  • Pip
  • 6 posts
thx for your posts guys.

i am using c# + ms sql database.

Depending on what i am doing means - try it out, right? ;)

#5
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Pretty much, yes. MS SQL is pretty efficient, but it can bog down if you give it a lot of data to process in a query with poor efficiency.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog