Questions tagged [database-optimization]

186 questions
0
votes
1 answer

How To Optimize Sql Server Database with Huge Log File

I've a sql server database sized 1677,25 MB. Here's my detailed DB size info: DB Size:1677.25 MB Unallocated space: 343.09 MB Reserved: 24488 KB Data: 18560 KB Index size: 2632 KB Unused: 3296 KB Row Count: 74410 So, as you can see it's not that big…
Gil
  • 513
  • 1
  • 6
  • 12
0
votes
2 answers

SQL - Store a calculated value (based on child tables) in a column or calculate in data model?

I have run into a little quandry, and I'm hoping the SO community can help me out with this one. I'm currently in a situation where we are writing custom logic for order discounts, which are based on configurable rules. In it's simplest form, here…
Keith
  • 5,100
  • 3
  • 31
  • 48
0
votes
1 answer

How to make this kind of table in mysql?

In my system I have two users: Request sender Users receive the requests I want to create my database tables  1-requestTable  __________ requestid  createdat  2-usersTable __________ userid name answer(yes/no) If I have 100 user and I send only…
mostashaar
  • 83
  • 1
  • 9
0
votes
2 answers

which is more efficient single table with large data columns or multiple tables? (hibernate - database)

My web application is implemented in Grails. My situation is that I have a domain class (hibernate class) with more columns and some of them are large Strings, up to 4000 characters. For example : String description // max 4000 // column2, column3,…
0
votes
1 answer

MySQL VARCHAR storing after setting null

I have big MySQL InnoDB table with some varchar(512) column. Next inserted rows depends on previously inserted. After inserting new row, varchar field of previously inserted row will be state meaningless. Previously inserted rows always were marked…
Ivan Velichko
  • 5,581
  • 3
  • 35
  • 72
0
votes
1 answer

How to optimize a Sybase ASE database?

What are the tricks to optimize a sybase database? What are the does and don'ts?
aF.
  • 58,798
  • 40
  • 127
  • 191
0
votes
1 answer

MySQL DB opimise through php

Another little bit which I am missing (as a beginner) I have a Backup script between two DB and as a final step I should optimise the real DB to reduce the size of the overhead. I have a code which works when I use only one DB but I need to use…
TryHarder
  • 740
  • 1
  • 6
  • 22
0
votes
6 answers

Is it of any drawback if a table has many (20+) foreign key constraints?

Let's says I have a table which has many fields linked to values from other "value tables". Naturally, I declare foreign key constraints on each and evary of them to enforce integrity. What if I finally get the number of such fields in the range of…
User
  • 28,268
  • 17
  • 74
  • 107
0
votes
1 answer

Storing MD5 values in a database

Possible Duplicate: Best practices for efficiently storing md5 hashes in mysql We use Hex representation of MD5 values in our system. Will it be wise to store them in our MySQL DB as integers instead of strings? will that improve searching the…
kambi
  • 2,839
  • 7
  • 32
  • 52
-1
votes
4 answers

How can I optimize this simple database and query using php and mysql?

I pull a range (e.g. limit 72, 24) of games from a database according to which have been voted most popular. I have a separate table for tracking game data, and one for tracking individual votes for a game (rating from 1 to 5, one vote per user per…
-1
votes
1 answer

SQLite: Very slow queries in a large database even with indexes

I have a large database. The database has the login and level columns. All queries were very slow before I created indexes on these columns. I used these commands to create indexes: CREATE INDEX users_login_index on users(login); CREATE INDEX…
-1
votes
3 answers

What algorithms could i implement to improve the general design and performance of a database?

I'm working on a project for university. Do you guys know what kind of algorithms i could implement that would help with the proper design and general performance of a database? Until now i came up with an algorithm that can help the user pick…
-1
votes
1 answer

MongoDB - Save vs Update

I have around 400 fields in my collection (including both at top level as well as embedded), following is the nature of write queries: All write queries always update single document and an average of 60 fields in that document. There are indexed…
-1
votes
1 answer

database optimization strategy for very large tables and expensive delete operations

Our Database has a very large table with several million rows of data. Some old code was written from a naive standpoint by myself several years ago, and doesn't handle for poor database performance. The database itself was also built at a point…
-1
votes
1 answer

MySQL - Query very slow

I have statements like this that are timing out: SELECT COUNT(*) FROM A WHERE A.value1 IN ( SELECT A.value1 FROM A WHERE A.value2 = 0 ) Table A has 13,000,000+ rows in it, and because of some reasons, I can't use indexes. So how to speed it up…
1 2 3
12
13