Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
754 views

Write complex query OR write simpler queries and combine the results in Backend service?

Take the following statement for example: 'Get results for ALL Active students of a Course'. Naturally, this query has 2 parts, Get all active students of the course. Get results of those ...
Jahirul Islam's user avatar
6 votes
3 answers
4k views

Effecient algorithm for data deduplication in procedural code

I have written a data cleansing application which, for the most part, works well. It is not designed to handle large volumes of data: nothing more than about half a million rows. So early on in the ...
Bob Tway's user avatar
  • 3,636
0 votes
1 answer
90 views

Where to format number strings? Server or browser?

I am storing numbers in my database without formatting (e.g., 1434587). But I need a formatted string in the UX (e.g., $1,434,587). Is it better to store the raw number AND the formatted value in the ...
Mowzer's user avatar
  • 189
0 votes
3 answers
257 views

Identical Databases for Multiple Users Reading Efficiency

Our project utilizes a static database (no writes). With many users we don't actually have a problem per se reading it. If a database "locks" per read request by any user, then would it not be more ...
victoroux's user avatar
  • 103
3 votes
1 answer
309 views

Processing every leaf under a node in a tree efficiently

Short version: In a tree (non-binary) with many levels of children, where each node can have multiple leaves, what is the best way to tally leaves that meet a certain condition given a node? Long, ...
SB2055's user avatar
  • 317
5 votes
1 answer
3k views

Rails application - how to optimize/reduce database calls when iterating over a collection

What's the best way to optimize a Rails app where you need to pull info from the database for a collection of items? For example, if I am building an online forum system... I would have a number of ...
Jim's user avatar
  • 1,997
41 votes
3 answers
48k views

Is there any reason to use varchar over text columns in a database?

Is varchar just a remnant from before text came around, or are there use cases where you would want to use a varchar? (Or char for that matter..) (I use Postgres and MySQL (MyISAM) daily, so those ...
Izkata's user avatar
  • 6,118
1 vote
2 answers
583 views

Is it more efficient to query once for all settings, or query whenever a setting is needed?

For my blog script I have a usergroup and permission system set up. Each user is assigned to a usergroup and I have a long list of permission settings. Both are stored in a MySQL database. At the ...
Jared's user avatar
  • 111