Questions tagged [limit]

Relates to any sort of limit applied to data or resources, e.g. limiting the size or value of a variable, limiting the rate of incoming traffic or CPU usage. [tag:sql-limit] should be used to refer to the LIMIT keyword in SQL.

Relates to any sort of limit applied to data or resources:

  • Limit a size of a database
  • Limit the admissable value of a variable
  • Limit to the rate of incoming traffic
  • Limit to CPU/reqource usage

Also relating to the mathematical notion of limit: the value that a sequence of numbers "approaches" as the sequence progresses.

Use for questions related to LIMIT keyword in SQL.

4370 questions
79
votes
5 answers

HTML5 localStorage size limit for subdomains

HTML5's localStorage databases are usually size-limited — standard sizes are 5 or 10 MB per domain. Can these limits be circumvented by subdomains (e.g. example.com, hack1.example.com and hack2.example.com all have their own 5 MB databases)? And is…
Chuck
  • 234,037
  • 30
  • 302
  • 389
79
votes
10 answers

How to increase Neo4j's maximum file open limit (ulimit) in Ubuntu?

Currently ulimit -n shows 10000. I want to increase it to 40000. I've edited "/etc/sysctl.conf" and put fs.file-max=40000. I've also edited /etc/security/limits.conf and updated hard and soft values. But still ulimit shows 10000. After making all…
theharshest
  • 7,767
  • 11
  • 41
  • 51
79
votes
1 answer

MySQL COUNT with LIMIT

What I want to do is SUM a column, but also COUNT the number of rows it is summing, with a limit of no more than 5 rows. So my query is: SELECT COUNT(*), SUM(score) FROM answers WHERE user=1 LIMIT 5 What I expected back was a COUNT(*) up to 5 (I…
Lee
  • 10,496
  • 4
  • 37
  • 45
74
votes
9 answers

Android Push Notification (GCM), is there any Daily Limit?

Is there any daily limit for number push notifications (GCM) can be sent to a particular android application user?
Sajith Amma
  • 1,157
  • 1
  • 9
  • 13
70
votes
6 answers

Does C++ limit recursion depth?

In Python there is a maximum recursion depth. Seems it is because Python is interpreted rather than compiled. Does C++ have the same concept? Or it is connected only with RAM limit?
Narek
  • 38,779
  • 79
  • 233
  • 389
70
votes
4 answers

PostgreSQL query very slow with limit 1

My queries get very slow when I add a limit 1. I have a table object_values with timestamped values for objects: timestamp | objectID | value -------------------------------- 2014-01-27| 234 | ksghdf Per object I want to get the latest…
pat
  • 2,600
  • 4
  • 20
  • 21
69
votes
11 answers

C#: Limit the length of a string?

I was just simply wondering how I could limit the length of a string in C#. string foo = "1234567890"; Say we have that. How can I limit foo to say, 5 characters?
Lemmons
  • 1,738
  • 4
  • 23
  • 33
69
votes
6 answers

first two results from ls command

I am using ls -l -t to get a list of files in a directory ordered by time. I would like to limit the search result to the top 2 files in the list. Is this possible? I've tried with grep and I struggled.
Fidel
  • 7,027
  • 11
  • 57
  • 81
68
votes
5 answers

Java 8 Stream: difference between limit() and skip()

Talking about Streams, when I execute this piece of code public class Main { public static void main(String[] args) { Stream.of(1,2,3,4,5,6,7,8,9) .peek(x->System.out.print("\nA"+x)) .limit(3) …
Luigi Cortese
  • 10,841
  • 6
  • 37
  • 48
67
votes
7 answers

MySQL LIMIT on DELETE statement

I put together a test table for a error I recently came across. It involves the use of LIMIT when attempting to delete a single record from a MySQL table. The error I speak of is "You have an error in your SQL syntax; check the manual that…
Andre
  • 1,347
  • 3
  • 14
  • 23
66
votes
7 answers

Check the open FD limit for a given process in Linux

I recently had a Linux process which “leaked” file descriptors: It opened them and didn't properly close some of them. If I had monitored this, I could tell – in advance – that the process was reaching its limit. Is there a nice, Bash or Python way…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
63
votes
9 answers

Using variable in a LIMIT clause in MySQL

I am writing a stored procedure where I have an input parameter called my_size that is an INTEGER. I want to be able to use it in a LIMIT clause in a SELECT statement. Apparently this is not supported, is there a way to work around this? # I want…
MPX
  • 1,075
  • 3
  • 10
  • 9
61
votes
6 answers

Hitting the 2100 parameter limit (SQL Server) when using Contains()

from f in CUSTOMERS where depts.Contains(f.DEPT_ID) select f.NAME depts is a list (IEnumerable) of department ids This query works fine until you pass a large list (say around 3000 dept ids) .. then I get this error: The incoming tabular data…
ban-G
  • 1,045
  • 2
  • 10
  • 15
57
votes
6 answers

Limit the amount of number shown after a decimal place in javascript

Hay, i have some floats like these 4.3455 2.768 3.67 and i want to display them like this 4.34 2.76 3.67 I don't want to round the number up or down, just limit the amount of numbers shown after the decimal place to 2.
dotty
  • 40,405
  • 66
  • 150
  • 195
55
votes
17 answers

Delete directory regardless of 260 char limit

I'm writing a simple script to delete USMT migration folders after a certain amount of days: ## Server List ## $servers = "Delorean","Adelaide","Brisbane","Melbourne","Newcastle","Perth" ## Number of days (-3 is over three days ago) ## $days =…
mhouston100
  • 1,173
  • 2
  • 19
  • 41